WorkerInterface
in
The Interface for worker processes
Table of Contents
Methods
- onProcessCreate() : mixed
- After the worker has been forked into another process
- onProcessDestroy() : mixed
- Before the worker process is getting destroyed
- run() : Serializable
- run the work
Methods
onProcessCreate()
After the worker has been forked into another process
public
onProcessCreate(Semaphore $semaphore) : mixed
Parameters
- $semaphore : Semaphore
-
the semaphore to run synchronized tasks
Tags
onProcessDestroy()
Before the worker process is getting destroyed
public
onProcessDestroy() : mixed
Tags
run()
run the work
public
run(Serializable $input) : Serializable
Parameters
- $input : Serializable
-
the data, that the worker should process
Tags
Return values
Serializable —Returns the result