Tcl package Thread source code

Check-in [b046c2b131]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Merge 2.8 branch
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: b046c2b131906db67080973f4e273d8b5d8b0008f063c67b499f64d3b4c4e0fb
User & Date: jan.nijtmans 2019-07-03 11:13:06
Context
2019-07-26
14:23
closes [b5709ea906]: thread::send - short circuit sending to itself should consider order of already dispatched events, and such events are expected definitely before any IDLE event, only the event synchronously sends to head of queue is expected as first to be processed; added test illustrating and covering the issue. check-in: f0bd14f53f user: sebres tags: trunk
2019-07-03
11:15
Merge trunk check-in: c26f94b084 user: jan.nijtmans tags: novem
11:13
Merge 2.8 branch check-in: b046c2b131 user: jan.nijtmans tags: trunk
11:12
Make keyedListType MODULE_SCOPE check-in: 64888f72a9 user: jan.nijtmans tags: thread-2-8-branch
10:43
Merge 2.8 branch. Use TCL_INDEX_NONE as appropriate check-in: 7120359506 user: jan.nijtmans tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/tclXkeylist.h.

27
28
29
30
31
32
33











34
35
36
37
38
39
40
MODULE_SCOPE void TclX_KeyedListInit(Tcl_Interp*);
MODULE_SCOPE int  TclX_KeyedListGet(Tcl_Interp*, Tcl_Obj*, const char*, Tcl_Obj**);
MODULE_SCOPE int  TclX_KeyedListSet(Tcl_Interp*, Tcl_Obj*, const char*, Tcl_Obj*);
MODULE_SCOPE int  TclX_KeyedListDelete(Tcl_Interp*, Tcl_Obj*, const char*);
MODULE_SCOPE int  TclX_KeyedListGetKeys(Tcl_Interp*, Tcl_Obj*, const char*, Tcl_Obj**);












/*
 * Exported for usage in Sv_DuplicateObj. This is slightly
 * modified version of the DupKeyedListInternalRep() function.
 * It does a proper deep-copy of the keyed list object.
 */

MODULE_SCOPE void DupKeyedListInternalRepShared(Tcl_Obj*, Tcl_Obj*);






>
>
>
>
>
>
>
>
>
>
>







27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
MODULE_SCOPE void TclX_KeyedListInit(Tcl_Interp*);
MODULE_SCOPE int  TclX_KeyedListGet(Tcl_Interp*, Tcl_Obj*, const char*, Tcl_Obj**);
MODULE_SCOPE int  TclX_KeyedListSet(Tcl_Interp*, Tcl_Obj*, const char*, Tcl_Obj*);
MODULE_SCOPE int  TclX_KeyedListDelete(Tcl_Interp*, Tcl_Obj*, const char*);
MODULE_SCOPE int  TclX_KeyedListGetKeys(Tcl_Interp*, Tcl_Obj*, const char*, Tcl_Obj**);

/*
 * This is defined in keylist.c. We need it here
 * to be able to plug-in our custom keyed-list
 * object duplicator which produces proper deep
 * copies of the keyed-list objects. The standard
 * one produces shallow copies which are not good
 * for usage in the thread shared variables code.
 */

MODULE_SCOPE Tcl_ObjType keyedListType;

/*
 * Exported for usage in Sv_DuplicateObj. This is slightly
 * modified version of the DupKeyedListInternalRep() function.
 * It does a proper deep-copy of the keyed list object.
 */

MODULE_SCOPE void DupKeyedListInternalRepShared(Tcl_Obj*, Tcl_Obj*);

Changes to generic/threadSvKeylistCmd.c.

13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
 * ---------------------------------------------------------------------------
 */

#include "threadSvCmd.h"
#include "threadSvKeylistCmd.h"
#include "tclXkeylist.h"

/*
 * This is defined in keylist.c. We need it here
 * to be able to plug-in our custom keyed-list
 * object duplicator which produces proper deep
 * copies of the keyed-list objects. The standard
 * one produces shallow copies which are not good
 * for usage in the thread shared variables code.
 */

extern Tcl_ObjType keyedListType;

/*
 * Wrapped keyed-list commands
 */

static Tcl_ObjCmdProc SvKeylsetObjCmd;
static Tcl_ObjCmdProc SvKeylgetObjCmd;
static Tcl_ObjCmdProc SvKeyldelObjCmd;






<
<
<
<
<
<
<
<
<
<
<







13
14
15
16
17
18
19











20
21
22
23
24
25
26
 * ---------------------------------------------------------------------------
 */

#include "threadSvCmd.h"
#include "threadSvKeylistCmd.h"
#include "tclXkeylist.h"












/*
 * Wrapped keyed-list commands
 */

static Tcl_ObjCmdProc SvKeylsetObjCmd;
static Tcl_ObjCmdProc SvKeylgetObjCmd;
static Tcl_ObjCmdProc SvKeyldelObjCmd;