Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Re: Inter-Process Messaging
Piet Hadermann
10/10/2007 3:30:00 PM
> -----Original Message-----
> From: Daniel DeLorme [mailto:dan-ml@dan42.com]
>
> Markus Schirp wrote:
> >
> > shared memory?
>
> Is there a ruby lib to handle shared memory? Also, I can see
> how it can be used for "passing information", but for
> messaging between processes wouldn't it require constant
> polling to check if a message is waiting in the shared memory?
>
Check
http://sysvipc.ruby...
It offers support for IPC message queues (and also shared memory and
semaphores if needed).
No need for polling. You can request a message (of a certain type of
needed), and your ruby process just holds until a message of that type
is available on the queue.
I've used it for > 1 year in a setup where a C++ process dispatches
messages that are handled by several parallel ruby processes.
Very light-weight and must have handled millions of messages without any
problem by now. (won't work on Windows though)
Piet.
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Re: Inter-Process Messaging
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password