Overview
| Artifact ID: | afb7e6cf502436683f16bacc4b7ae443c7d2357e96a1e55b2ff696536c059745 |
|---|---|
| Ticket: | d82a78ebf2b9ede7aa6b87b47b3f316d0c0c816e
Clarify execution order for thread creation scripts |
| User & Date: | elfring on 2019-05-05 14:45:39 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed to:
I have tried the following small script out for the software “TCL 8.6.9-1.5” on an openSUSE system. package require Thread puts {Thread creation} set id [thread::create { puts "The thread [thread::id] will sleep for a moment." after 1200 puts "The thread [thread::id] is waiting for work." thread::wait }] puts "Additional thread ($id) was created." puts {The main thread will sleep for a moment.} after 1230 puts {End of test case} Test result: elfring@Sonne:~/Projekte/TCL> tclsh test-thread1.tcl Thread creation The thread tid0x7fadfc763700 will sleep for a moment. Additional thread (tid0x7fadfc763700) was created. The main thread will sleep for a moment. The thread tid0x7fadfc763700 is waiting for work. End of test case I got the impression from such test output that the main thread is informed about the identification for the additional thread before the preparation script of this extra thread was finished. I find such software behaviour questionable in comparison to the provided documentation. https://www.tcl.tk/man/tcl/ThreadCmd/thread.htm#M6 I interpreted the information from the thread package manual in the way for a while that it would be possible to let the calling thread to continue with its work only after successful initialisation of a related task. There are some data processing consequences to consider if you can not depend on a known execution order there. How would you like to clarify this situation? - foundin changed to: "8.6.9"
- is_private changed to: "0"
- login: "elfring"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- severity changed to: "Minor"
- status changed to: "Open"
- submitter changed to: "elfring"
- subsystem changed to: "80. Thread Package"
- title changed to:
Clarify execution order for thread creation scripts
- type changed to: "Bug"