multi-Thread
[1/8] from: arnaud:dutartre:europe:tgs at: 29-Nov-2002 16:07
Hello,
I have already posted about this point of interest but I ask again ...
Rebol is not multi-thread so I have to do it by myself. I look the Rugby
engine and it is a cooperative engine.
Does anyone use an engine to do multi-thread, for example for game (computer
thinking, ...).
I really want to make a checker game but without it, it seems to be hard.
The computer will not 'think' only when it is its turn ...
Any idea or experience are welcomed ....
Thx
Arno:)
[2/8] from: cyphre:seznam:cz at: 29-Nov-2002 19:32
Hello Arno,
You don't need multithreading for chcker game IMO.You can use Rebol/View's
event system (using RATE, making own event-handler etc.) for doing
background tasks
...I know, it is not the real multi-threading but in such
application like checkers it should be sufficient enough so the user(player)
cannot notice it.
If you have any questions just contact me directly, maybe I could help you
with the game.
regards,
Cyphre
P.S. I think it is possible to make(at some level) pre-emptive multitasking
in current Rebol but it would need some more experimeting and I think there
would be sure some performance problems...but this is just my speculation
and I could be absolutely wrong. Would be cool if some threading guru step
into this discussion. Carl? ;-)
[3/8] from: rotenca::telvia::it at: 29-Nov-2002 20:58
Hi, Cyphre
> You don't need multithreading for chcker game IMO.You can use Rebol/View's
> event system (using RATE, making own event-handler etc.) for doing
> "background tasks"...I know, it is not the real multi-threading but in such
> application like checkers it should be sufficient enough so the user(player)
> cannot notice it.
How do you resolve the problem that Wait cannot be called by a event driven
routine?
> P.S. I think it is possible to make(at some level) pre-emptive multitasking
> in current Rebol but it would need some more experimeting and I think there
> would be sure some performance problems...but this is just my speculation
But how do you think to resolve the problem that rebol functions are not
reentrants, because of words binding?
---
Ciao
Romano
[4/8] from: arnaud:dutartre:europe:tgs at: 2-Dec-2002 10:42
Yes I would like more information. For example a sample code of RATE with
rebol/view ...
Thx
Arno.
PS : What does IMO means ?
[5/8] from: info:id-net:ch at: 2-Dec-2002 12:30
IMO : In my Opinion
[6/8] from: anton:lexicon at: 3-Dec-2002 0:05
Essayez-vous:
view layout [
box rate 1 feel [
engage: func [face action event][
if action = 'time [print "do some work"]
]
]
]
It is a way to add a rate to any style.
Anton.
> Yes I would like more information. For example a sample code of RATE with
> rebol/view ...
>
> Thx
> Arno.
>
> PS : What does IMO means ?
It means "In my opinion".
You see also "IMHO" = "In my honest opinion".
[7/8] from: alban:gabillon:univ-pau at: 3-Dec-2002 14:37
Hi All,
Maybe I missed something ...
Are we talking about real thread (created with "pthread_create in" C) or
just separate process (created "with" fork in C) ?
In other words, what is the equivalent of the fork function in Rebol ? I
guess it means running a separate rebol console from the main program. How
to do this ? Then, how the 2 process can communicate with eachother ?
Thx
==============================================
Alban Gabillon
University of Pau
LIUPPA/Connected System SECurity
Antenne de Mont de Marsan
371, rue du Ruisseau BP 201
40004 Mont de Marsan Cedex France
Tel: (33) 5 58 05 76 05
Fax: (33) 5 58 06 83 70
email: [gabillon--univ-pau--fr]
http://csysec.univ-pau.fr/
[8/8] from: greggirwin:mindspring at: 3-Dec-2002 11:20
Hi Alban,
AG> In other words, what is the equivalent of the fork function in Rebol ? I
AG> guess it means running a separate rebol console from the main program. How
AG> to do this ? Then, how the 2 process can communicate with eachother ?
You can use CALL if you have View/Pro or /Command. Depending on your
needs, you can communicate in various ways (STDIO, TCP sockets,
command line args, shared files, etc.).
-- Gregg