NAME

Para::Frame::Child - Representing a child process from the PARENTs view

DESCRIPTION

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.

register

register_worker

deregister

  $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: -

yield

  $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.

get_results

req

  $fork->req

Returns the request coupled to the fork.

  $fork->pid

Returns the CHILD process id number.

  $fork->id

status

  $fork->status

Returns the exit status of the CHILD process.

result

  $fork->result

Returns the Para::Frame::Child::Result object, after the child is done.

in_child

  $fork->in_child

Returns false.

in_parent

  $fork->in_parent

Returns true.

failed

  $fork->failed

Returns true if the child registred an exception.

succeeded

  $fork->succeeded

Rerurns true if the child didn't register an exception.

AUTHOR

Jonas Liljegren <jonas@paranormal.se>

SEE ALSO

Para::Frame::Request, Para::Frame::Child::Result