D 2003-01-27T20:07:44
J icomment Logged\sIn:\sYES\s\nuser_id=572001\n\n1.\sPlease\sadd\syour\sbetter\sexplanation\sto\sthe\sdocumentation.\n\n2.\sMy\sintention\sis\sjust\sto\sexecute\sa\ssingle\sfunction\scalll\sunder\sthe\s\nlock\sprotection.\nBut\sI\sthink\sthat\sI\swill\snot\sget\sthe\sreturn\scode\sof\sthe\s"unsafe"\s\nfunction\s"open"\sin\smy\sfirst\sversion\sof\sthe\sexample.\sI\swill\sget\sthe\s\nreturn\svalue\sof\sthe\sfunction\scall\s"thread::eval"\sinstead.\sHow\sdo\s\nyou\sthink\sabout\sit?\n\nset\s$TID\s[thread::create\s-preserved]\ntsv::set\sX\smyMutex\s[thread::mutex\screate]\nthread::send\s$TID\s\\\n\s\s{\n\s\s\sthread::eval\s-lock\s[tsv::get\sX\smyMutex]\s{catch\s{open\sTest.txt\sw}\s\nTest}\n\s\s\sreturn\s$Test\n\s\s}\sFile\nputs\s$File\sHallo\nclose\s$File\nthread::mutex\sdestroy\s[tsv::get\sX\smyMutex]\nthread::release\s$TID\n\nCan\sthe\sretrieval\sfor\sreturn\svalues\sfrom\sother\sthreads\smade\s\neasier?\nDoes\sthe\ssecond\sexample\sshow\sa\suse\scase\sthat\scan\sbe\s\nsupported\sby\sa\ssingle\sfunction\sin\sthe\sTCL\sthreads\sAPI?\n
J login elfring
J mimetype text/plain
J username elfring
K 674367ffffffffffffffffffffffffffffffffff
U elfring
Z 5dbf1d390bfd6610d9a5bceeb8d0d0b5