<i>Occasional (1 in 3 times) error</i> status still Open with 5 other changes
by
.
D 2002-01-12T04:33:08
J icomment Logged\sIn:\sYES\s\nuser_id=75003\n\nI\sam\snot\ssatisified\swith\sthe\sproposed\ssolution\sof\susing\s\nTclInExit\s(as\spublic\sAPI)\sto\savoid\sthe\sproblem.\sThreads\sare\s\nusual\sunwound\s(thread::unwind)\sfrom\snested\sevent\sloops\sand\s\ncan\sprocess\sarbitrary\scommands\sbefore\sactually\sexiting.\s\nThis\smeans\sthat\sthis\scode\smay\suse\sany\sglobal\ssubsystem\sof\s\nthe\stcl-library,\sincluding\sthe\sPreserve-subsystem,\sand\snot\s\nonly\sby\scalling\sTcl_Release,\sbut\sTcl_Preserve\sas\swell.\sAs\s\nall\sthese\sglobal\ssusbsystems\sare\seffectively\salready\s\nshutdown\sanything\smay\shappen,\smost\slikely\scrashes\sin\sother\s\nplaces.\sAnd\sTclInExit\swill\stide\sus\sover\sthese\sonly\sso\sfar.\n\nThe\smain\sproblem\sI\ssee\sexposed\sthrough\sthis\sbug\sis\sIMHO\s\nthat\sthe\smain\sthread\sis\sspecial.\sShutting\sdown\sa\sthread\s\ncreated\sby\sthe\sThread\spackage\sfinalizes\sthis\sthread\sand\sall\s\ndata\spertaining\sto\sit.\sBut\sshutting\sdown\sthe\smain\sthread\s\nadditionally\sfinalizes\sall\sglobal\sinformation\sshared\sacross\s\nall\sthe\sexisting\sthreads,\sthus\srendering\sall\sother\sthreads\s\nunable\sto\srun.\n\nSo,\swhat\spossible\ssolutions\sdo\swe\shave\sto\sthis\s?\n\n1)\sHave\sthe\sthread\spackage\sregister\sa\sglobal\sexit\shandler.\s\nAs\sthese\sare\scalled\sbefore\severything\selse\sthis\swill\sallow\s\nthe\sthread\spackage\sto\ssimply\skill\sall\sthreads\sstill\srunning\s\n(This\swould\salso\sbe\sthe\sapproved\sand\spublic\smethod\sof\s\ngetting\sthe\sinformation\sthat\swe\sare\sin\sexiting\sthe\s\nprocess).\sThe\sdownside\swould\sbe\sthat\sthe\skilled\sthreads\smay\s\nnot\shave\scompleted\stheir\sactions.\sIn\sthe\sspecific\scase\sof\s\nthis\sbug\sit\swould\sbe\smost\slikely\sthat\sthe\slogger\sthread\sis\s\nkilled\sand\sunable\sto\sprint\sthe\slog\smessages\sof\sthe\slast-\nclosing\sworker-thread.\sBut\sthis\sis\ssomething\swhich\scan\sbe\s\nworked\saround.\n\n2)\sFind\sa\sway\sto\sblock\sthe\sfinalization\sof\sthe\smain\sthread\s\nand\sglobal\sinformation\suntil\safter\sall\sthe\sother\sthreads\s\nare\sfinalized.\sThe\sdownside\sis\sthat\san\simproperly\scoded\s\napplication\smay\ssimply\shang\son\sexit\sbecause\sof\sone\sor\smore\s\nthreads\snot\sshutting\sdown,\sor\snot\sshut\sdown.\n\nOf\sthe\ssolutions\sabove\sI\sprefer\sthe\sfirst\sone\sas\sits\s\ndownside\sis\sless\stroubling\sthan\sthe\sdownside\sof\sthe\ssecond\s\nto\sme.\sIf\ssomeone\selse\ssees\sother\ssolutions\sI\swould\sbe\s\nhappy\sto\shear\sabout\sthem.\n\n
J login andreas_kupries
J mimetype text/plain
J priority 7\sHigh
J username andreas_kupries
K 486399ffffffffffffffffffffffffffffffffff
U andreas_kupries
Z 402075b1511860bcac1c57882ddcfd9e