in reply to Re: Re: Using objects and basic types from other Perl interpreters transparently.
in thread Using objects and basic types from other Perl interpreters transparently.
About adding the resource, what you mean withthis is a thread that exists in other interpreter?my $thread = threads->remote( "host:port" );
Well, it would look like a thread to the local program. It's just that the thread runs somewhere else.
Actually, you would need it to tell what sub to run on the other side as well, so I guess the syntax would be:
and consequently, forks should have a seperately installable server functionality as well (which now only happens in a fork).my $thread = threads->remote( 'host:port:namespace::subname' );
Currently, when you register a shared variable, it is the server who assigns ordinal numbers to know which variable is associated with what remote variable. Currently the numbers are the same on either side, so some type of mapping would be needed. And other things would prop up as well. But if we could get this together, then not only could you offload threads to other systems, you would have create a very transparent Perl RPC mechanism as well.
But you already have some bidiretional socket system for forks, not? Maybe I can use it.
forks uses the blocking behaviour of sockets to handle all the locking and cond_wait/signal/broadcast issues. So all of your locking issues should be handle by that already. So yes, I think you can definitely use the code, or even better: integrate it into forks.pm.
I'm willing to work with you on that!
Liz
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Using objects and basic types from other Perl interpreters transparently.
by gmpassos (Priest) on Apr 12, 2004 at 19:02 UTC |