Skip to content
Tcl Source Code Artifact [7f8d292f2a]
Login

Artifact [7f8d292f2a]

Artifact 7f8d292f2a11b2aa2e6319dc06540811a8c2e6e184d37475e564792fd1a12bcd:

Ticket change [7f8d292f2a] - New ticket [ddd71e92fbc0ef41|ddd71e92fb] <i>External event loops cannot setup event sources</i>. by anonymous on 2026-06-18 02:45:10.
D 2026-06-18T02:45:10.585
J assignee nobody
J closer nobody
J cmimetype text/x-markdown
J comment `Tcl_DoOneEvent`\shandles\sevent\ssources\sare\sfollows:\r\n\r\n-\ssetup\sevent\ssources\sby\scalling\stheir\s`setupProc`\r\n-\scall\s`Tcl_WaitForEvent`\r\n-\scheck\sevent\ssources\sby\scalling\stheir\s`checkProc`\r\n\r\nThe\s`setupProc`\sof\san\sevent\ssource\smay\scall\s`Tcl_CreateFileHandler`\sto\srequest\smonitoring\ssome\sfile\sdescriptor.\sSuch\sa\sfile\sdescriptor\sthen\sgets\sincluded\sby\s`Tcl_WaitForEvent`\sin\sthe\sset\sof\sfile\sdescriptors\sto\swatch\sin\sthe\sblocking\scall\sto\s`select`/`epoll`/`kqueue`.\r\n\r\nWhen\sreplacing\sthe\snotifier\svia\s`Tcl_SetNotifier`,\sinstead\sof\s`Tcl_DoOneEvent`\sI\srun\sthe\sexternal\sevent\sloop,\swhich\swill\smake\sa\sblocking\scall\sto\s`select`/`epoll`/`kqueue`\ssimilar\sto\s`Tcl_WaitForEvent`.\sHowever,\sI\sdon't\ssee\sa\sway\sto\scall\s`setupProc`\son\sthe\sevent\ssources\sbefore\smaking\sthe\sblocking\scall,\sas\sthe\sevent\ssources\sare\slocal\sto\s`tclNotify.c`.\r\n\r\nTo\sprocess\sthe\sevent\ssources,\sI\scould\scall\s`Tcl_ServiceAll`,\swhich\sruns\r\n\r\n-\ssetup\sevent\ssources\sby\scalling\stheir\s`setupProc`\r\n-\scheck\sevent\ssources\sby\scalling\stheir\s`checkProc`\r\n\r\nwith\sno\swaiting\sstep\sin\sbetween,\seffectively\spolling\sthe\sevent\ssources.\sBut\sthat\sstill\swon't\slet\sme\scall\s`setupProc`\sbefore\sthe\sblocking\scall\sand\s`checkProc`\safter\sthe\sblocking\scall.\sAs\sa\sresult,\sthe\sexternal\sevent\sloop\smay\sget\sstuck\son\sthe\sblocking\scall\sif\s`setupProc`\sindeed\screates\sa\sfile\shandler\sfor\sa\sfile\sdescriptor\sthe\sexternal\sevent\sloop\sis\snot\saware\sabout.
J foundin 8.6,\s9.0
J is_private 0
J login anonymous
J priority 5\sMedium
J resolution None
J severity Important
J status Open
J submitter anonymous
J subsystem 01.\sNotifier
J title External\sevent\sloops\scannot\ssetup\sevent\ssources
J type Bug
K ddd71e92fbc0ef41b3fc61aa23b4b6c908a76ab9
U anonymous
Z fa0a9b9fa74aa5acb0d84c938f7d606c