… | |
… | |
248 | having to load any extra module. They are part of the child-side API of |
248 | having to load any extra module. They are part of the child-side API of |
249 | L<AnyEvent::Fork::RPC>. |
249 | L<AnyEvent::Fork::RPC>. |
250 | |
250 | |
251 | =over 4 |
251 | =over 4 |
252 | |
252 | |
253 | =item AnyEvent::Fork::RPC::quit |
|
|
254 | |
|
|
255 | This function can be called to gracefully stop the child process when it |
|
|
256 | is idle. |
|
|
257 | |
|
|
258 | After this function is called, the process stops handling incoming RPC |
|
|
259 | requests, but outstanding events and function return values will be sent |
|
|
260 | to the parent. When all data has been sent, the process calls C<exit>. |
|
|
261 | |
|
|
262 | Since the parent might not expect the child to exit at random points in |
|
|
263 | time, it is often better to signal the parent by sending an C<event> and |
|
|
264 | letting the parent close down the child process. |
|
|
265 | |
|
|
266 | =item AnyEvent::Fork::RPC::event ... |
253 | =item AnyEvent::Fork::RPC::event ... |
267 | |
254 | |
268 | Send an event to the parent. Events are a bit like RPC calls made by the |
255 | Send an event to the parent. Events are a bit like RPC calls made by the |
269 | child process to the parent, except that there is no notion of return |
256 | child process to the parent, except that there is no notion of return |
270 | values. |
257 | values. |