Para::Frame::Child - Representing a child process from the PARENTs view
Create a fork using Para::Frame::Request/create_fork.
This is the object that the PARENT gets, that is used for recieving the result from the CHILD.
See Para::Frame::Request/create_fork for examples.
Large results may take considerable time to reconstruct by Storable/thaw.
Then the child is done, it returns the Para::Frame::Child::Result object. If the retrieval of the data succeed, it check for exceptions in the object added by Para::Frame::Child::Result/exception. If there are any exceptions, the first of them is given to Para::Frame::Result/exception. If no exceptins was found, all the Para::Frame::Child::Result/on_return are run.
$child->deregister( $status, $length )
If $status
is defined, sets it as the return status of the CHILD
process.
If $length
must only be given if the whole of the message has been
recieved and it should be the length of the message in bytes. If
not given, we will try to read the remaining part of the message.
returns: -
$fork->yield
Do other things until we get the result from the child.
Returns the Para::Frame::Child::Result object.
Using Para::Frame::Child::result/on_return are prefered over /yield.
$fork->req
Returns the request coupled to the fork.
$fork->pid
Returns the CHILD process id number.
$fork->id
$fork->status
Returns the exit status of the CHILD process.
$fork->result
Returns the Para::Frame::Child::Result object, after the child is done.
$fork->in_child
Returns false.
$fork->in_parent
Returns true.
$fork->failed
Returns true if the child registred an exception.
$fork->succeeded
Rerurns true if the child didn't register an exception.
Jonas Liljegren <jonas@paranormal.se>