PHP_Fork
[ class tree: PHP_Fork ] [ index: PHP_Fork ] [ all elements ]

File: exec_methods.php

Source Location: /PHP_Fork-0.3.2/examples/exec_methods.php

Classes:

Classes definition. In real world you surely want to keep each class into a separate file, then include() it into your application.

Page Details:

Includes:

require_once("PHP/Fork.php") [line 31]
PHP_Fork class usage examples ================================================================================== NOTE: In real world you surely want to keep each class into a separate file, then include() it into your application.

For this examples is more useful to keep all_code_into_one_file, so that each example shows a unique feature of the PHP_Fork framework. ================================================================================== exec_methods.php

This example shows a workaround to execute methods into the child process. Always remember that this is an emulation, and the variable spaces are separated between separate processes! There're two kinds of methods: PHP_FORK_VOID_METHOD and PHP_FORK_RETURN_METHOD the first returns nothing, the second can return any serializable value

ATTENTION: this feature of PHP_Fork is highly experimental; all things are OK until we run such an example, that does nothing and simply sleep() all time waiting for a call. Some experiement with real applications seems to show that firing the child process with a signal (that is part of the workaround...) causes the process to stop execution, and then to repeat ALL the run() method after signal caught... This is not an acceptable behaviour and should be tested better.

==================================================================================


Documentation generated on Mon, 11 Mar 2019 15:41:27 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.