Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: Multiple Threads Crash

From: holger:rebol at: 24-Jul-2001 9:40

On Mon, Jul 23, 2001 at 07:01:00PM -0400, [Sanghabum--aol--com] wrote:
> Hi all, > > The code below is something I started writing to get a feel for Rebol's > undocumented concurrent and muti-threading capabilities, and to verify where > and what sort of serialisation code I need to build into my applications.
Calling 'wait from within an awake handler is not really supported. It is bad style anyway, because in event-driven systems event handlers are not allowed to block. That's because blocking in an event handler makes programs extremely difficult to debug, in particular if the list of handlers (meaning, faces) is modified while another handler is suspended. The problem is that all those suspended handlers carry hidden "context" around with them, and you might end up with an "old" handler being woken up from suspension after the face it has been associated with has already been removed from the pane, by a different handler. Other complications are possible, as well. It is extremely difficult to foresee all of these side effects, so programs that use tricks like that are bound to be buggy and full of race conditions. As for the crashes, this is the result of a limit on recursion in current REBOL versions. Should be eliminated in one of the next version. -- Holger Kruse [holger--rebol--com]