Running DRb in the main thread?

L

Laurent Julliard

I was wondering if there are some low level API that I can use in Drb
to make it run as the equivalent of an "event loop" in the main thread
of a program rather than having DRb starting its own thread as it does
when start_service is invoked.

The reason for this is that I need to run a remote program without
disturbing its original list of threads. So running "synchronously" in
the main thread would be ok.

Advices and ideas are welcome

Laurent
 
E

Eric Hodel

--Apple-Mail-6-445480992
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII; format=flowed

I was wondering if there are some low level API that I can use in Drb
to make it run as the equivalent of an "event loop" in the main thread
of a program rather than having DRb starting its own thread as it does
when start_service is invoked.

The reason for this is that I need to run a remote program without
disturbing its original list of threads. So running "synchronously" in
the main thread would be ok.

Advices and ideas are welcome

How about using ThreadGroup to organize your threads?

--Apple-Mail-6-445480992
content-type: application/pgp-signature; x-mac-type=70674453;
name=PGP.sig
content-description: This is a digitally signed message part
content-disposition: inline; filename=PGP.sig
content-transfer-encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)

iD8DBQFBwx/sMypVHHlsnwQRAjE0AJ9HQ/Q6OnGD91AEqrOwdjIX4b0TcgCfdj2l
9ToJCU1tsCsCXpkybnV2mtQ=
=Lxwh
-----END PGP SIGNATURE-----

--Apple-Mail-6-445480992--
 
L

Laurent Julliard

Eric said:
How about using ThreadGroup to organize your threads?

It doesn't solve my problem because what I want is to avoid disturbing
the scheduling of the original threads.

I looked at the code and it looks like the only way I can do this is
by rewriting the main_loop method of drb/drb.rb in my own program.

Laurent
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top