Skip to content
Tcl Source Code Artifact [d3166e28ff]
Login

Artifact [d3166e28ff]

Artifact d3166e28ff44524246b6cef3538ac251324f3887:

Ticket change [d3166e28ff] - Closed ticket [417839ffffffffff|417839ffff]: <i>vwait bug</i> plus 8 other changes by dkf on 2001-04-23 16:38:24.
D 2001-04-23T16:38:24
J assignee dkf
J closedate 2001-04-23T09:38:24
J closer dkf
J icomment Logged\sIn:\sYES\s\nuser_id=79902\n\nThis\sis\snot\sa\sbug,\sbut\sa\sconsequence\sof\sthe\sfact\sthat\n[vwait]s\s*nest*,\sand\souter\s[vwait]s\scannot\sterminate\sbefore\nall\sevent\shandlers\s(containing\scalls\sto\s[vwait]\sas\sit\sturns\nout)\sfinish.\s\sIn\sthis\scase,\syou've\sgot:\n\nmain\n\s\sproc\sf2\n\s\s\s\svwait\stemp\n\s\s\s\s\s\safter\shandler\n\s\s\s\s\s\s\s\sproc\sf1\n\s\s\s\s\s\s\s\s\s\sgetLock\n\s\s\s\s\s\s\s\s\s\s\s\svwait\slock\n\nAs\syou\scan\ssee,\sthe\swait\sfor\stemp\swon't\sfinish\swhile\sall\nthat\sclutter\sinside\sit\sis\sstill\sgoing,\sbut\suntil\sthat\nhappens,\sthe\sassignment\sto\slock\swon't\shappen\sand\sthe\sinner\nwait\sfor\slock\swon't\sterminate.\s\sHence\sDEADLOCK.\n\nNo\schange\sof\sthis\sbehaviour\sis\spossible\swithout\sa\scomplete\nchange\sof\ssome\spretty\sfundamental\sstuff\s(e.g.\sinterpreters\nhave\sto\shave\smultiple\sthreads\sexecuting\swithin\sthem,\smeaning\nyou\sneed\sto\sintroduce\slots\sof\ssemaphores\sand\smonitors,\slots\nof\scode\sneeds\sto\sbe\supdated\sto\sno\slonger\sassume\sthat\sevent\nhandlers\srun\suninterruptably,\setc.)\n\nThe\seasiest\sway\sof\sfixing\syour\scode\sis\sprobably\sto\sget\srid\nof\snested\s[vwait]s\s(and\s[update]\sand\s[tkwait]\stoo)\sby\snever\ncalling\sthe\scommand\sin\san\sevent\shandler\s(there\sare\sa\sfew\nsituations\swhere\sit\sis\suseful,\sbut\sthis\sisn't\sone\sof\sthem\nIMO)\sand\sto\stake\sadvantage\sof\sthe\sfact\sthat\sevent\shandlers\nwill\snot\sbe\spre-empted\sby\sthe\sinterpreter.\n
J login dkf
J mimetype text/plain
J resolution Invalid
J status Closed
J username dkf
K 417839ffffffffffffffffffffffffffffffffff
U dkf
Z 9ddcc37977b01f5c8598ba2dd253f0ca