<i>WinSock cores/hangs on thread or app exit</i> status still Open with 4 other changes
by
.
D 2006-03-15T03:29:36
J icomment Logged\sIn:\sYES\s\nuser_id=95086\n\nDavid,\s\n\nYou\sare\sspeaking\sof\ssome\semail\swhere\s\syou\sexplained\nthe\sproblem.\sWhere\sdid\syou\ssend\sit?\sI\snever\sgot\sany\ssuch\semail!\n\nAll\sI\sgot\swas\syour\sresponse\son\sthis\sthread\sin\sBug\stracker.\s\nHence\sI\shad\sto\sask\swhat's\swrong.\sYou\swould\sdo\sthe\ssame,\nwouldn't\syou?\sI\sbelieve\swe\shave\ssome\scomm\sproblem\shere...\n\nI'm\squoting:\s\nIt\swaits\sfor\sthe\sasync\snotification\swindow\sto\sbe\sin\sa\sready\sstate\sfor\suse\nby\sWSAAsyncSelect.\sIf\sit\sreally\sis\staking\sover\s20\sseconds\sto\ncreate\sa\swindow\sin\sa\sthread,\ssomething\selse\sis\swrong.\s\n\n\nWHAT\selse\sis\swrong?\sIs\sthis\ssystem\s(Window)\sso\sundeterministic?\nI\sasked\sonce.\sI'm\sasking\sonce\sagain:\n\n\s\s\s\s\s\s\stsdPtr->hwnd\s=\sCreateWindow("TclSocket",\s"TclSocket",\s\n\s\s\s\sWS_TILED,\s0,\s0,\s0,\s0,\sNULL,\sNULL,\swindowClass.hInstance,\sarg);\n\nIs\sthis\scall\s(CreateWindow)\sdefined\sto\sreturn\ssometime?\nCan\sit\sblock\sforever?\nIf\syes,\sfor\swhat\sreason\si.e.\sunder\swhich\scircumstances?\s\nIf\syes,\sis\sthe\ssystem\susabe\sany\smore\safter\sthat?\nDo\syou\shave\sa\ssituation\swhere\syou\scan\ssimply\s\nand\seasily\sreproduce\sit?\s\n\nI\shave\sread\sthe\sfunction\sspecs\sin\sMSDN\sand\sthere\sis\s\nnothing\sabout\sthat\scall\sblocking\sindefinitely.\n\nI\sdecided\sto\sblock\sthere\sinstead\sof\sgo\sover\sit.\sI\swould\s\nlike\sto\sknow\sWHY\sthe\sapp\sblocks\sthere!\sIt\sis\sso\ssimple\nto\sput\sa\stimeout\sthere\sand\sabandon\sbut\sthis\sis\snot\sbuying\nyou\sanything\sand\swill\smost\sprobably\shang\ssomewhere\selse.\n\nIf\sthe\sCreateWindow\sis\sknown\sto\sblock\sindefinitely,\sthen\nwhy\shas\sanybody\screated\ssuch\sa\spoor\simplementation\s\nat\sall\sin\sthe\sfirst\splace?\sIf\sit\sis\sso,\sthen\sit\shas\sto\sbe\sre-written.\nI\snever\ssolve\sany\ssuch\sproblems\sby\sbrute-force\s(which\sthe\ntimeout\sat\sTHAT\splace\sdefinitely\sis).\sAnd\sI\shave\sgood\sreasons\nto\sfollow\sthat\smantra.\n\nSo:\sonce\sagain:\scan\sCreateWindow\sblock\sindefinitely?\s\nIf\syes:\swhen\sand\swhy?\n
J login vasiljevic
J mimetype text/plain
J username vasiljevic
K 1437595fffffffffffffffffffffffffffffffff
U vasiljevic
Z b7f42edb723e4c60dfcb14068a5c0bbc