Mutli-threading
[1/12] from: mlo:info:fundp:ac:be at: 12-Mar-2003 15:29
Hello,
Is that possible to handle the multi-threading (concurrent programming like
in Java) in rebol ?
Thnx.
Miguel
[2/12] from: greggirwin:mindspring at: 12-Mar-2003 10:24
Hi Miguel,
ML> Is that possible to handle the multi-threading (concurrent programming like
ML> in Java) in rebol ?
REBOL doesn't support native multi-threading, but some folks around
here have written cooperative threading engines with REBOL. What is it
you're trying to accomplish?
-- Gregg
[3/12] from: maarten:koopmans:surfnet:nl at: 12-Mar-2003 20:59
Specifically Rugby, a broker solution implements co-op threading.
http://www.rebolforces.com/~erebol
--Maarten
Gregg Irwin wrote:
[4/12] from: mlo:info:fundp:ac:be at: 12-Mar-2003 21:54
On 3/12/03 6:24 PM, "[NAME]" <[ADDRESS]> wrote:
> Hi Miguel,
> ML> Is that possible to handle the multi-threading (concurrent programming
<<quoted lines omitted: 4>>
> you're trying to accomplish?
> -- Gregg
Open multiple sockets at the same time for measuring the CPU load of a
server. I have to know which thread fails which doesn't, its prioririty, its
CPU load...
[5/12] from: g:santilli:tiscalinet:it at: 13-Mar-2003 10:02
Hi Miguel,
On Wednesday, March 12, 2003, 9:54:17 PM, you wrote:
ML> Open multiple sockets at the same time for measuring the CPU load of a
ML> server.
Asynch IO should be enough for that. (It's almost undocumented, so
feel free to ask here for advice.)
Regards,
Gabriele.
--
Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer
Amigan -- AGI L'Aquila -- REB: http://web.tiscali.it/rebol/index.r
[6/12] from: petr:krenzelok:trz:cz at: 13-Mar-2003 10:31
Gabriele Santilli wrote:
>Hi Miguel,
>On Wednesday, March 12, 2003, 9:54:17 PM, you wrote:
<<quoted lines omitted: 4>>
>Regards,
> Gabriele.
Hi Gabriele,
so maybe you have it documented already? ... so you could share it with
ml? :-)
-pekr-
[7/12] from: maarten:koopmans:surfnet:nl at: 13-Mar-2003 10:55
Hi Miguel,
Or use non-blocking I/O with event handling. If you download Rugby,
http://www.rebolforces.com/~erebol
you'll see a file called hipe.r in the modules subdirectory of the
archive. This is an I/O engine that does exactly that. You simple supply
it a function that "knows" how to handle incoming data (the handler).
Rugby is just such a function.
Feel free to ask any advice if you'll need more info on it.
There is an article about hipe as well:
http://www.rebolforces.com/articles/hipe.html
--Maarten
[8/12] from: maarten:koopmans:surfnet:nl at: 13-Mar-2003 10:55
BTW, Gabriele,
Please explain it ;-)
--Maarten
[9/12] from: g:santilli:tiscalinet:it at: 13-Mar-2003 11:16
Hi Petr,
On Thursday, March 13, 2003, 10:31:35 AM, you wrote:
PK> so maybe you have it documented already? ... so you could share it with
PK> ml? :-)
I don't. But some people have digged into it a bit; also, in 99%
of cases just /no-wait and using awake functions properly is
enough.
I started thinking about writing an asynch root-protocol, but
didn't have the time to really do it yet...
Regards,
Gabriele.
--
Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer
Amigan -- AGI L'Aquila -- REB: http://web.tiscali.it/rebol/index.r
[10/12] from: petr:krenzelok:trz:cz at: 13-Mar-2003 11:47
Maarten Koopmans wrote:
> BTW, Gabriele,
>
> Please explain it ;-)
Hello Maarten. Maybe one and a half year ago, I met Holger at IOS
(Express at that time) conference and I asked him about async network
IO. He mentioned to me that is nearly ready, but rebol level protocols +
support funcs would have to be rewritten. So my assumption is - latest
releases contain full async IO already, but I can be wrong of course.
Look at rmp-init source parts (cantained in Link client)
if not port/port-id [
port/port-id: either direct [2997] [80]
]
; but you remember - we should not touch those things, as they may
change in the future :-)
-------
either obj/server-mode [
obj/port-handler: :rmp-listen-handler
port/async-modes: 'accept
open/direct/binary port
] [
as you can see, under the hood there seem to be some way of how to
handle connections, but we wait for following syntax mentioned by Holger:
image: open/async http://www.rebol.com/image.gif :my-callback
voila, and console is freed and all stuff downloaded in the background
and once data is received, your defined callback function is called ...
or so was the idea ....
The question is, how high is rewrite of protocols and other stuff that
may be necessary to get it fully working is high on RT's priority list ...
Cheers,
-pekr-
[11/12] from: petr:krenzelok:trz:cz at: 13-Mar-2003 12:03
Gabriele Santilli wrote:
>Hi Petr,
>On Thursday, March 13, 2003, 10:31:35 AM, you wrote:
<<quoted lines omitted: 3>>
>of cases just /no-wait and using awake functions properly is
>enough.
it is a pity imo that there is plenty of code using /no-wait already, so
we are meeting some compatibility issues here. I would prefer having
no-wait behavior as default for ports, and reverse the logic - if you
want synchronous communication, use open/wait .... but I can understand
it would break a lot of code probably ...
cheers,
-pekr-
[12/12] from: g:santilli:tiscalinet:it at: 13-Mar-2003 12:44
Hi Petr,
On Thursday, March 13, 2003, 12:03:11 PM, you wrote:
PK> we are meeting some compatibility issues here. I would prefer having
PK> no-wait behavior as default for ports, and reverse the logic - if you
If your script isn't event based, you wouldn't get any advantage
anyway.
Regards,
Gabriele.
--
Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer
Amigan -- AGI L'Aquila -- REB: http://web.tiscali.it/rebol/index.r
Notes
- Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted