2009/10/25 Phil Dawes <[email protected]>:
> Hi Slava,
>
> Slava Pestov wrote:
>> No native mutex is needed if you have a pair of pipes between every
>> two VMs that need to communicate. Then, one VM thread writes to the
>> pipe, another VM thread reads from it. Since a VM thread is so
>> heavy-weight (it has its own data heap) opening a handful of pipes is
>> nothing.
>>
>
> I thought about the n^2 pipes option, but thought that the bootstrap
> would be a bit of a pita: Each time a new vm starts all the others have
> to coordinate and listen on new pipes.

Would this work?

If VM A needs to communicate with VM B, A must have at least some
"pointer" to B. So A can ask B "give me the pipe handle I use to talk
to you. B allocates and caches new handles if needed, then returns the
appropriate one to A. (As the handle is defined to be the same each
time, A can also cache it, if that is appropriate).

So there's no bootstrap-time allocation, pipe creation can be delayed
to be "on demand".

Paul.

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to