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

[REBOL] Re: timers in Core would be enough imo :-) (was) Re: Re: REBOL multithr

From: rotenca::telvia::it at: 14-Feb-2002 14:35

Hi, Petr
> And face based mechanism actually can't be used in Core and Command - they > both don't have face compositing engine. I don't remember correctly, if > someone from RT already commented this here or not in the past .... it > would be probably good to have general timers to move into Core language > ....It would not be much of a problem to implement some kind of make-task > then. We need either general timer! datatype, or just some kind of > configurable scheme (open [scheme: 'timer rate: 0.001 awake: my-func]). > Such port would then be put then in wait-list ....
I do not think that multitasking can be easily done in Rebol for a reason: i could be wrong, but if you make a dispatch in the middle of a function and two tasks are executing the same function, the function's locals will be corrupted, because both the context and the function body would be shared between tasks. First, you must save locals of every functions (tree of calls), second you must rebind every body at every switch. An alternative is to use functions which duplicate their own bodies at every call, like Ladislav's e-func (if I remember well) else I think that the overhead would be too big for save+binding. --- Ciao Romano ----- Original Message ----- From: "Petr Krenzelok" <[petr--krenzelok--trz--cz]> To: <[rebol-list--rebol--com]> Sent: Thursday, February 14, 2002 9:48 AM Subject: [REBOL] timers in Core would be enough imo :-) (was) Re: Re: REBOL multithreading