Tcl package Thread source code

Check-in [1765cdf3c9]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2018 Conference, Houston/TX, US, Oct 15-19
Send your abstracts to tclconference@googlegroups.com
or submit via the online form by Aug 20.

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

Overview
Comment:test-cases extended
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | thread-2-8-branch
Files: files | file ages | folders
SHA3-256:1765cdf3c96c582b6e24d030821d49aa5a13e450bfaf0fc4dd45f366dfb82928
User & Date: sebres 2018-07-17 10:23:26
Context
2018-07-17
11:30
code review check-in: dcb4f6c364 user: sebres tags: thread-2-8-branch
10:24
merge 2.8 (test-cases) check-in: 8c4a3c600d user: sebres tags: trunk
10:23
test-cases extended check-in: 1765cdf3c9 user: sebres tags: thread-2-8-branch
09:54
more extensive fix for [76f47e0376fb] and similar errors (additionally avoid segfault if string representation would be broken, e. g. without NTS 0-byte). check-in: 98170da165 user: sebres tags: thread-2-8-branch
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to tests/thread.test.

249
250
251
252
253
254
255

256
257
258




259
260
261












262
263
264
265
266
267
268
    set five [thread::send $tid {set x}]
    ThreadReap
    set five
} {5}

test thread-11.7 {thread::send - async send with event-loop wait} {
    ThreadReap

    set tid [thread::create]
    thread::send -async $tid {set x 5} five
    vwait five




    ThreadReap
    set five
} {5}













test thread-11.8 {thread::send - send to self directly} {
    thread::send [thread::id] {set x 5} five
    set five
} {5}

test thread-11.9 {thread::send - send to self asynchronously} {







>



>
>
>
>

|
|
>
>
>
>
>
>
>
>
>
>
>
>







249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
    set five [thread::send $tid {set x}]
    ThreadReap
    set five
} {5}

test thread-11.7 {thread::send - async send with event-loop wait} {
    ThreadReap
    set res {}
    set tid [thread::create]
    thread::send -async $tid {set x 5} five
    vwait five
    lappend res $five; set five {}
    thread::send -async $tid {set x 5} [binary format cccc 0x66 0x69 0x76 0x65]; # five as byte array without str-rep.
    vwait five
    lappend res $five; set five {}
    ThreadReap
    set res
} {5 5}

test thread-11.7.1 {thread::send - sync send with var} {
    ThreadReap
    set res {}
    set tid [thread::create]
    thread::send $tid {set x 5} five
    lappend res $five; set five {}
    thread::send $tid {set x 5} [binary format cccc 0x66 0x69 0x76 0x65]; # five as byte array without str-rep.
    lappend res $five; set five {}
    ThreadReap
    set res
} {5 5}

test thread-11.8 {thread::send - send to self directly} {
    thread::send [thread::id] {set x 5} five
    set five
} {5}

test thread-11.9 {thread::send - send to self asynchronously} {