Skip to content
Tcl Source Code Artifact [afb7e6cf50]
Login

Artifact [afb7e6cf50]

Artifact afb7e6cf502436683f16bacc4b7ae443c7d2357e96a1e55b2ff696536c059745:

Ticket change [afb7e6cf50] - New ticket [d82a78ebf2b9ede7|d82a78ebf2] <i>Clarify execution order for thread creation scripts</i>. by elfring on 2019-05-05 14:45:39.
D 2019-05-05T14:45:39.502
J assignee nobody
J closer nobody
J cmimetype text/plain
J comment I\shave\stried\sthe\sfollowing\ssmall\sscript\sout\sfor\sthe\ssoftware\s“TCL\s8.6.9-1.5”\son\san\sopenSUSE\ssystem.\r\n\r\npackage\srequire\sThread\r\nputs\s{Thread\screation}\r\nset\sid\s[thread::create\s{\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sputs\s"The\sthread\s[thread::id]\swill\ssleep\sfor\sa\smoment."\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\safter\s1200\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sputs\s"The\sthread\s[thread::id]\sis\swaiting\sfor\swork."\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sthread::wait\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s}]\r\nputs\s"Additional\sthread\s($id)\swas\screated."\r\nputs\s{The\smain\sthread\swill\ssleep\sfor\sa\smoment.}\r\nafter\s1230\r\nputs\s{End\sof\stest\scase}\r\n\r\n\r\nTest\sresult:\r\n\r\nelfring@Sonne:~/Projekte/TCL>\stclsh\stest-thread1.tcl\r\nThread\screation\r\nThe\sthread\stid0x7fadfc763700\swill\ssleep\sfor\sa\smoment.\r\nAdditional\sthread\s(tid0x7fadfc763700)\swas\screated.\r\nThe\smain\sthread\swill\ssleep\sfor\sa\smoment.\r\nThe\sthread\stid0x7fadfc763700\sis\swaiting\sfor\swork.\r\nEnd\sof\stest\scase\r\n\r\n\r\nI\sgot\sthe\simpression\sfrom\ssuch\stest\soutput\sthat\sthe\smain\sthread\sis\sinformed\sabout\sthe\sidentification\sfor\sthe\sadditional\sthread\sbefore\sthe\spreparation\sscript\sof\sthis\sextra\sthread\swas\sfinished.\r\nI\sfind\ssuch\ssoftware\sbehaviour\squestionable\sin\scomparison\sto\sthe\sprovided\sdocumentation.\r\nhttps://www.tcl.tk/man/tcl/ThreadCmd/thread.htm#M6\r\n\r\nI\sinterpreted\sthe\sinformation\sfrom\sthe\sthread\spackage\smanual\sin\sthe\sway\sfor\sa\swhile\sthat\sit\swould\sbe\spossible\sto\slet\sthe\scalling\sthread\sto\scontinue\swith\sits\swork\sonly\safter\ssuccessful\sinitialisation\sof\sa\srelated\stask.\r\nThere\sare\ssome\sdata\sprocessing\sconsequences\sto\sconsider\sif\syou\scan\snot\sdepend\son\sa\sknown\sexecution\sorder\sthere.\r\n\r\nHow\swould\syou\slike\sto\sclarify\sthis\ssituation?
J foundin 8.6.9
J is_private 0
J login elfring
J priority 5\sMedium
J resolution None
J severity Minor
J status Open
J submitter elfring
J subsystem 80.\sThread\sPackage
J title Clarify\sexecution\sorder\sfor\sthread\screation\sscripts
J type Bug
K d82a78ebf2b9ede7aa6b87b47b3f316d0c0c816e
U elfring
Z 0240cda20c116d4e26ac910317c300fd