Parellel operation 
Author Message
 Parellel operation

I'm trying to write a Perl script where I want to spawn several
processes, and have them run in parallel.

That is, I do not want Perl to stop at the point of execution, finish
the subroutine, then continue. I want to run the subroutine while still
executing the calling subroutine.

So if I am in process 1, and I spawn process 2 from process 1 at x
seconds after execution, I want process 1 and process 2 to run in
parallel.

How can I do that in Perl?
Perl 5 on RedHat.

Thanks,
Sherif

Sent via Deja.com http://www.*-*-*.com/
Share what you know. Learn what you don't.



Fri, 30 Nov 2001 03:00:00 GMT  
 Parellel operation

Quote:

> I'm trying to write a Perl script where I want to spawn several
> processes, and have them run in parallel.

> That is, I do not want Perl to stop at the point of execution, finish
> the subroutine, then continue. I want to run the subroutine while still
> executing the calling subroutine.

> So if I am in process 1, and I spawn process 2 from process 1 at x
> seconds after execution, I want process 1 and process 2 to run in
> parallel.

> How can I do that in Perl?
> Perl 5 on RedHat.

You will probably want to use fork()

/J\
--
"My codpiece layeth awkwardly across the nadgers" - Declan Donnelly



Fri, 30 Nov 2001 03:00:00 GMT  
 Parellel operation

Quote:
> You will probably want to use fork()

> /J\
> --
> "My codpiece layeth awkwardly across the nadgers" - Declan Donnelly

Thanks for the reply. This helps a lot.

Sherif :)

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.



Fri, 30 Nov 2001 03:00:00 GMT  
 Parellel operation
On Mon, 14 Jun 1999 13:58:08 GMT,

Quote:

> So if I am in process 1, and I spawn process 2 from process 1 at x
> seconds after execution, I want process 1 and process 2 to run in
> parallel.

If you can fork(),

   perldoc -f fork
   perldoc perlipc

also check on CPAN for modules Proc::*

HTH,

--
-hasan-
uhm, no more sig(h)



Sat, 01 Dec 2001 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. LWP::Parallel looks not being parellel

2. Parellel processing and concurrency control.

3. Speed of substr operation on UTF-8 strings?

4. int operations

5. db operations

6. Help wanted for handling DB-operation with Perl

7. Thread Operations: Kill, Suspend, Resume, Yield, Signal, etc...

8. Modules for array formatting, RCS data and List operations ALPHA

9. Problems with floating-point operations

10. X operation in bigperl debugger?

11. Block scoped ref array manipulation operations

12. Atomic operations in Perl

 

 
Powered by phpBB® Forum Software