.
D 2021-01-06T18:37:53.483
J closedate 2459221.27631346
J closer sebres
J icomment <blockquote><i>>\sI\shave\sconfigured\sthe\sTCL\swith\s-enable_thread\sflag\sand\srun\sbelow\sTCL\scommands.</i></blockquote>\r\n\r\noption\s"-enable_thread"\s(as\swell\sas\sthreads\sthemselves)\shas\snothing\sto\sdo\swith\san\sevent\scycle\s(you\shandle\squasi\ssingle-threaded\shere),\sthis\soption\sjust\sallows\sto\suse\sthreads\sin\stcl\sat\sall\s(e.\sg.\sthread\smodule\sor\ssome\ssystem\sthreads,\sso\sthe\slibrary\sis\susable\swith\sthreads).\r\n\r\nAlso\sdon't\sconfuse\stcl\swith\sother\slangs\susing\sGIL\s(for\sexample\swith\spython),\severy\stcl\sinterpreter\sbelong\sto\sexactly\sone\smain\sthread,\swhom\sis\sallowed\sto\sexecute\scode\sin\sthis\sinterpreter.\sThere\sare\sfew\sexceptions\sin\stcl\sworld,\swhich\scould\sact\sacross\sthe\sthreads\sor\sare\sshared\sbetween\sthe\sworkers.\r\n\r\nEvent\scycle\sis\sto\sconsider\ssingle-threaded\s(basically\sthis\sis\strue\sin\severy\slanguage).\r\n\r\n<blockquote><i>>\sshould\sit\sbe\shang\sor\snot\s?</i></blockquote>\r\n\r\nyes,\sthis\sis\sfully\sexpected\sbehavior,\sbecause\sas\salready\ssaid\s<code>after\s700</code>\sdoes\sjust\sa\ssleep\sfor\scurrent\sthread,\sthe\sevents\sare\snot\sexecuted\sat\sall;\sread\s[https://www.tcl.tk/man/tcl8.6/TclCmd/after.htm|documentation]\sor\s[https://wiki.tcl-lang.org/page/Tcl+event+loop|wiki\s::\sTcl\sevent\sloop]\sfor\smore\sinfo.\r\n\r\nRegarding\sthe\sthreads,\syou\smay\stake\sa\slook\sat\s[https://www.tcl.tk/man/tcl8.6/ThreadCmd/contents.htm|thread\spackage].
J login sebres
J mimetype text/x-fossil-wiki
J status Closed
K 570cb6afea12bc135f6c78afc0abae53a1918438
U sebres
Z fa659c255bb710373bc73b77a4a47b0b