NAME
Distributed::Process::BaseWorker - base class for all workers, both local and remote
SYNOPSIS
DESCRIPTION
Methods
None of these methods are actually implemented in this base class. There all implement in either Distributed::Process::LocalWorker, Distributed::Process::RemoteWorker or Distributed::Process::MasterWorker.
Methods in Distributed::Process::MasterWorker will invoke the methods by the same name on all the Distributed::Process::RemoteWorker subscribed with the server.
Methods in Distributed::Process::RemoteWorker will simply send a command to their connected client, asking it to run the same method locally.
Methods in Distributed::Process::LocalWorker will do the actual job.
- synchro TOKEN
-
Waits for all the connected clients to reach this synchronisation point. TOKEN is a message, mostly used to identify which synchronisation point is being reached when reading the debug output.
- run
-
This must must be overloaded in subclasses to actually implement the task that is to be run remotely. Calls to methods whose name starts with a double underscore (as in
__example
) will be run remotely, while all the others will be run locally. - postpone NAME, LIST
-
Runs the method NAME with the given LIST of arguments after a short delay. The delay will change with each Worker in a session, so that the Master can arrange to have the Workers run their tasks a few moments after one another instead of running them all at one. See Distributed::Process::Master for details.
- time NAME, LIST
-
Runs the method NAME with the given LIST of arguments and reports the time it took by means of the result() method.
- reset_result
-
Flushes the results from memory. This should be called between two calls to run() so that the results from the second run are not appended to those of the first.
- result STRING
- result
-
When called with an argument, adds the STRING to the queue of messages to send back to the server.
When called without arguments, returns the list of queued messages.
SEE ALSO
Distributed::Process::LocalWorker, Distributed::Process::MasterWorker, Distributed::Process::RemoteWorker, Distributed::Process::Worker.
AUTHOR
Cédric Bouvier, <cbouvi@cpan.org>
BUGS
Please report any bugs or feature requests to bug-distributed-process@rt.cpan.org
, or through the web interface at http://rt.cpan.org. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
COPYRIGHT & LICENSE
Copyright 2005 Cédric Bouvier, All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 124:
Non-ASCII character seen before =encoding in 'Cédric'. Assuming CP1252