On Feb 11, 2008, at 6:59 PM, MenTaLguY wrote:

> On Tue, 12 Feb 2008 08:18:03 +0900, fedzor <fedzor / gmail.com> wrote:
>> So I was messing with actors today, and I found that I couldn't get
>> an actor to run concurrently with the main thread. Am I just wishing
>> fibers are something they're not?
>
> To a point.  However, note that if you want an actor to sleep for  
> one second
> and permit other actors to proceed, you can just receive with a  
> timeout of
> one second, rather than using sleep.  Receive is how revactor  
> actors transfer
> control to one another.
>
> Of course, if the main thread exits (as it would in your code),  
> then the
> spawned actor won't have a chance to finish.

Can you give me some example code of working with receive? I kind of  
understand, but feel like some code would really nail it in.

Thanks,
Ari
-------------------------------------------|
Nietzsche is my copilot