Re: Problem with Tcl_AsyncCreate()
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.tcl archive

Re: Problem with Tcl_AsyncCreate()

From: Kevin Kenny <kennykb@acm.org>
Date: Sat Mar 04 2006 - 21:07:14 CET

san wrote:
> If a signal occurs token should be set by handler and handler_safe will
> be executed if in safe state.
> I have a problem here. token is being set but handler_safe is not being
> called at proper place...

If you're running a non-threaded build on Unix, try it again in a
threaded build, and see if that improves the situation. There's
a long-standing problem that the arrival of Tcl_AsyncMark in
a signal handler in a non-threaded build will not interrupt the
select() in the event loop.

A work-around, if signal response times of a few milliseconds
in an idle process are OK, is to have a "do-nothing" timer event
that reschedules itself every few milliseconds. The async will
be detected once the process is no longer idle.

--
73 de ke9tv/2, Kevin
Received on Sun Apr 30 02:23:33 2006