REBOL multithreading
[1/5] from: stopm::mediaone::net at: 13-Feb-2002 23:43
Is it possible to run two functions concurrently in REBOL?
Alex
[2/5] from: al:bri:xtra at: 14-Feb-2002 19:32
> Is it possible to run two functions concurrently in REBOL?
No.
But it is possible to run two or more Rebol interpreters on the one
computer.
Andrew Martin
ICQ: 26227169 http://valley.150m.com/
[3/5] from: carl:cybercraft at: 14-Feb-2002 20:39
On 14-Feb-02, Alex Liebowitz wrote:
> Is it possible to run two functions concurrently in REBOL?
Not sure if there's any way to do it with functions, (I certainly wish
there was), but a semblence of multi-tasking can be achieved using
'feel in a View layout...
win-1: layout [
a: field "1" rate 1 feel [
engage: [
a/text: to-string (to-integer a/text) + 1
show a
]
]
button "Other Window" [view/new win-2]
]
win-2: layout [
b: field "1" rate 10 feel [
engage: [
b/text: to-string (to-integer b/text) + 1
show b
]
]
]
view win-1
It stops when a window is closed though. ):
--
Carl Read
[4/5] from: joel:neely:fedex at: 14-Feb-2002 9:10
Hi, Andrew,
Pardon the marketing... ;-)
Andrew Martin wrote:
> > Is it possible to run two functions concurrently in REBOL?
>
> No.
>
> But it is possible to run two or more Rebol interpreters on the one
> computer.
>
Well, at least not until the next article hits REBOLforces.
Sort of.
-jn-
--
; sub REBOL {}; sub head ($) {@_[0]}
REBOL []
# despam: func [e] [replace replace/all e ":" "." "#" "@"]
; sub despam {my ($e) = @_; $e =~ tr/:#/.@/; return "\n$e"}
print head reverse despam "moc:xedef#yleen:leoj" ;
[5/5] from: koopmans:itr:ing:nl at: 18-Feb-2002 10:55
You can quite easily implement a system of cooperative multithreading using
objects. I am sure Joel will have more to say about this soon....
Meanwhile, checkout the latest Rugby release which implements this as well
using add-thread and remove-thread.
http://www.rebolfroces.com/~erebol
--Maarten