You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, to keep the Tcl event loop processing, it is necessary for the Javascript side to ensure that interp.process_events() or interp.eval("update") is periodically processed. However, this is currently an implementation detail that the user should not have to be aware of.
The normal Node.JS behavior is to exit the "node" process once it has reached the end of the script file and there are no remaining event handlers installed or eligible to potentially run in the future.
It would be desirable to make interp.eval() silently install a hook that would periodically call interp.process_events() only as long as there are Tcl event handlers that could be triggered. This would allow the same normal Node.JS behavior of automatically exiting the process once all JavaScript and Tcl event handlers have completed, without any additional special handling code by the user.
The limiting factor currently seems to be that there is no way from the Tcl C API to determine if there are no more installed Tcl event handlers. There are some details in "man n Notifier" about the Tcl event sources, which might be relevant but this requires more research.
The text was updated successfully, but these errors were encountered:
Hey if you're still interested here's an initial attempt at solving this problem: ekarak/node-tcl@2ab3923
It involves replacing the default tcl event loop with a custom v8/uv-driven one.
Cheers,
Elias
It looks like nukedzn/node-tcl is a completely independent project, not
derived from mine at all? I wasn't aware of any other similar efforts yet.
On Mon, Dec 7, 2015 at 1:42 AM, Elias Karakoulakis <[email protected]
wrote:
Hey if you're still interested here's an initial attempt at solving this
problem: ekarak/node-tcl@2ab3923 ekarak/node-tcl@2ab3923
It involves replacing the default tcl event loop with a custom
v8/uv-driven one.
Cheers,
Elias
—
Reply to this email directly or view it on GitHub #3 (comment).
Currently, to keep the Tcl event loop processing, it is necessary for the Javascript side to ensure that interp.process_events() or interp.eval("update") is periodically processed. However, this is currently an implementation detail that the user should not have to be aware of.
The normal Node.JS behavior is to exit the "node" process once it has reached the end of the script file and there are no remaining event handlers installed or eligible to potentially run in the future.
It would be desirable to make interp.eval() silently install a hook that would periodically call interp.process_events() only as long as there are Tcl event handlers that could be triggered. This would allow the same normal Node.JS behavior of automatically exiting the process once all JavaScript and Tcl event handlers have completed, without any additional special handling code by the user.
The limiting factor currently seems to be that there is no way from the Tcl C API to determine if there are no more installed Tcl event handlers. There are some details in "man n Notifier" about the Tcl event sources, which might be relevant but this requires more research.
The text was updated successfully, but these errors were encountered: