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

[REBOL] Re: using 'wait with your own port handler?

From: petr:krenzelok:trz:cz at: 26-Jun-2001 7:01

Holger Kruse wrote:
> On Sun, Jun 24, 2001 at 09:24:51PM +0200, Martin Johannesson wrote: > > > This all seems to work, EXCEPT for 'wait. So, my question is this: Is it > > at all possible to write your own port handler that you can wait for using > > 'wait? > > The short answer is no. There are two issues: > > - How do you get REBOL to "wake up" when your library is done > playing ? This is the difficult part and always OS-dependent. For Windows > there would, e.g., have to be a way for a script to allocate a WinMsg,
and? :-) just kidding, see below ...
> register it with REBOL's internal wait handler, and tie it to a port. > For other operating systems the procedure would be different.
So, I thought each platform has ability to somehow generate/send events/messages .... probably difficult to wrap into one consistent solution?All that multiplatform issues are strange things sometimes. Last time I was surprised once Gabriele said my file locking mechanism will not work on Unix, as even if app regularly locks it, another task can delete it ... However, sometimes the value of certain solution is little too high to miss it :-) Sometimes also, so called "multiplatform" usage is little bit blurred. The answer is simple - the script does work for you or not. What is the difference if my script will not work for me, because someone used odbc in it, while I don't own /command? Or sound? I can't use it while I buy /Pro. I noticed that even in current state of Rebol development, there are some slight differences (Be and Elate don't supporting some network blabla I don't remember now, ability to use some special Mac fs capability ...) So, if some much desired functionality (e.g. ability to produce own events) would be possible to be supported on 80 - 90% of platforms, it is worth consideration imo. btw: I noticed that few ppl already expressed desire to have even mechanism available in Core. What for? I don't know :-) But having face/rate enables us to have some kind of pseudo tasking, be more async, etc. Maybe we are looking for some kind of watch: make timer! 0.1 func-here or watch: open [ scheme: 'timer rate: 1 awake: func-here ] ? Or will we get regular threading? I remember you stated that it is not so easy (if even possible) to make the feature work on other platforms? But in general, having threading or not, View is very nice example of what can be achieved by very clever design. I can't wait to see, what you guys at RT are cooking to bring us even more asynchronicity :-) -pekr-