D 2025-01-05T06:24:15.971 J icomment Based\son\san\sinitial\sdiagnosis,\sthe\scause\sseems\sto\sbe\sthat\sprior\sto\sthe\s\r\nreferenced\scommit,\sthe\serror\shandler\swas\sinvoked\sin\sthe\sinterp\sthat\sregistered\r\nit\svia\sthread::errorproc\s*as\sdocumented*.\sWith\sthe\scommit\schanges,\sthe\serror\r\nhandler\sis\sinvoked\sin\sthe\stoplevel\sinterp\sof\sthe\sthread.\sSince\sthat\sdoes\snot\r\nhave\sthe\shandler\sproc\s(thread_error_handler\sin\sthe\sexample)\sdefined,\san\serror\r\nis\sraised\sfrom\sthe\sevent\sloop\scallback\sThreadEvent\swhich\scalls\sThreadErrorProc.\r\nThe\sThreadErrorProc\sthen\ssends\sthe\serror\sevent\sto\sthe\starget\sthread\r\nwhich\shappens\sto\sbe\sitself\s(since\sthat\sis\swhere\sthe\sinitial\sattempt\sto\r\ncall\sthe\shandler\swas\smade).\sThis\sevent\sis\spicked\sup\soff\sthe\squeue\sand\sresults\r\nin\sThreadEvent\sinvoked\sagain\swith\sThreadErrorProc\sas\sthe\starget\sresulting\sin\r\n"recursion"\svia\sthe\sevent\sloop.\r\n\r\nTcl_ServiceEvent\s(vwait)\r\n->\sThreadEventProc\s(initially\scalled\sfrom\sthe\s\r\n\s\s\s->\sThreadSendEval\s(script\s=\sthread_error_handler)\r\n\s\s\s\s\s\s->\sTcl_EvalEx\s("thread_error_handler\s...")\r\n\s\s\s\s\s\s<-\sTCL_ERROR\s(proc\snot\sfound)\r\n\s\s\s<-\sTCL_ERROR\s(returned\sto\sThreadEventProc)\r\n\s\s\s->\sThreadErrorProc\r\n\s\s\s\s\s\s->\sThreadSend\s(to\sself,\serrorProcString="thread_error_handler")\sso\seffectively\srecursing!\r\n\s\s\s\s\s\s\s\s\s->\sTcl_ThreadQueueEvent(to\sself,\sevent.eventProc=ThreadEventProc)\r\n<-----------\r\nTcl_ServiceEvent\sservices\sthe\sjust\squeued\sevent,\r\ncalling\sThreadEventProc.ThreadErrorProc\sagain\r\n\r\nThe\sevent\squeue\snever\sempties,\sthe\stimer\sevent\snever\sfires\sand\r\nTcl\seffectively\shangs\s(or\sloops\scontinuously\sto\sbe\sprecise). J login apnadkarni J mimetype text/plain K ea413868a4991fc079506a5fc314f8d252dcb13c U apnadkarni Z 6d2049d482ca7a6c2c09b2529704082e