> The AsyncProc will be called by Tcl at the border of bytecoded blocks
> for an active Tcl_Eval* or immediately if the Tcl thread is idle in the
> event loop. What is the proper place you want the handler to be called
> at? By design, the thread that called addsignal() will be the same one
> to to call handler_safe(). Hopefully that's the thread you run Tcl
> from. The thread that calls handler() can be any thread, btw.
I have created new commands:
$ signal add 2 proc
This command will add proc in a table and will execute it if signal no
2(SIGINT) occurs.
Now I am pressing Ctrl C. handler() should be called to set the token
and when safe, handler_safe() should be called which in turn should
call proc.
What is happening in my case is handler() is setting the token but
handler_safe() is not being called after that. When I am trying to
execute some other command on the command line, then the handler_safe()
is being called.
I am not using any multithreading. I think the Tcl takes care of
checking the token and if the token is set then run the handler_safe().
Received on Sun Apr 30 02:17:34 2006