… | |
… | |
44 | This module uses processes created via AnyEvent::Fork (or |
44 | This module uses processes created via AnyEvent::Fork (or |
45 | AnyEvent::Fork::Remote) and the RPC protocol implement in |
45 | AnyEvent::Fork::Remote) and the RPC protocol implement in |
46 | AnyEvent::Fork::RPC to create a load-balanced pool of processes that |
46 | AnyEvent::Fork::RPC to create a load-balanced pool of processes that |
47 | handles jobs. |
47 | handles jobs. |
48 | |
48 | |
49 | Understanding of AnyEvent::Fork is helpful but not critical to be able |
49 | Understanding AnyEvent::Fork is helpful but not required to use this |
50 | to use this module, but a thorough understanding of AnyEvent::Fork::RPC |
50 | module, but a thorough understanding of AnyEvent::Fork::RPC is, as it |
51 | is, as it defines the actual API that needs to be implemented in the |
51 | defines the actual API that needs to be implemented in the worker |
52 | worker processes. |
52 | processes. |
53 | |
53 | |
54 | PARENT USAGE |
54 | PARENT USAGE |
55 | To create a pool, you first have to create a AnyEvent::Fork object - |
55 | To create a pool, you first have to create a AnyEvent::Fork object - |
56 | this object becomes your template process. Whenever a new worker process |
56 | this object becomes your template process. Whenever a new worker process |
57 | is needed, it is forked from this template process. Then you need to |
57 | is needed, it is forked from this template process. Then you need to |