matz / ruby-lang.org (Yukihiro Matsumoto) wrote in message news:<1051225465.365698.19097.nullmailer / picachu.netlab.jp>... > Hi, > > In message "Re: asynchronous ruby" > on 03/04/25, daniel <offstuff / aon.at> writes: > > |Ohter languages (tcl) own's a method to > |manage this. > > Pretty interesting. I'd like to hear about how other languages solve > this kind of problems. API example, please? > > Last time I tried Tcl/Tk did not work well with native threads. > Probably they did something since then. > > > matz. some text about tcl and manage events... -- These procedures provide a safe mechanism for dealing with asynchronous events such as signals. If an event such as a signal occurs while a Tcl script is being evaluated then it isn't safe to take any substantive action to process the event. For example, it isn't safe to evaluate a Tcl script since the interpreter may already be in the middle of evaluating a script; it may not even be safe to allocate memory, since a memory allocation could have been in progress when the event occurred. The only safe approach is to set a flag indicating that the event occurred, then handle the event later when the world has returned to a clean state, such as after the current Tcl command completes. -- I'm searching for a similar method to handle my events and callbacks... daniel