… | |
… | |
4 | <head> |
4 | <head> |
5 | <title>libev</title> |
5 | <title>libev</title> |
6 | <meta name="description" content="Pod documentation for libev" /> |
6 | <meta name="description" content="Pod documentation for libev" /> |
7 | <meta name="inputfile" content="<standard input>" /> |
7 | <meta name="inputfile" content="<standard input>" /> |
8 | <meta name="outputfile" content="<standard output>" /> |
8 | <meta name="outputfile" content="<standard output>" /> |
9 | <meta name="created" content="Thu Nov 22 13:26:17 2007" /> |
9 | <meta name="created" content="Fri Nov 23 05:35:59 2007" /> |
10 | <meta name="generator" content="Pod::Xhtml 1.57" /> |
10 | <meta name="generator" content="Pod::Xhtml 1.57" /> |
11 | <link rel="stylesheet" href="http://res.tst.eu/pod.css"/></head> |
11 | <link rel="stylesheet" href="http://res.tst.eu/pod.css"/></head> |
12 | <body> |
12 | <body> |
13 | <div class="pod"> |
13 | <div class="pod"> |
14 | <!-- INDEX START --> |
14 | <!-- INDEX START --> |
… | |
… | |
237 | <p>This uses the Solaris 10 port mechanism. As with everything on Solaris, |
237 | <p>This uses the Solaris 10 port mechanism. As with everything on Solaris, |
238 | it's really slow, but it still scales very well (O(active_fds)).</p> |
238 | it's really slow, but it still scales very well (O(active_fds)).</p> |
239 | </dd> |
239 | </dd> |
240 | <dt><code>EVMETHOD_ALL</code></dt> |
240 | <dt><code>EVMETHOD_ALL</code></dt> |
241 | <dd> |
241 | <dd> |
242 | <p>Try all backends (even potentially broken ones). Since this is a mask, you |
242 | <p>Try all backends (even potentially broken ones that wouldn't be tried |
|
|
243 | with <code>EVFLAG_AUTO</code>). Since this is a mask, you can do stuff such as |
243 | can do stuff like <code>EVMETHOD_ALL & ~EVMETHOD_KQUEUE</code>.</p> |
244 | <code>EVMETHOD_ALL & ~EVMETHOD_KQUEUE</code>.</p> |
244 | </dd> |
245 | </dd> |
245 | </dl> |
246 | </dl> |
246 | </p> |
247 | </p> |
247 | <p>If one or more of these are ored into the flags value, then only these |
248 | <p>If one or more of these are ored into the flags value, then only these |
248 | backends will be tried (in the reverse order as given here). If none are |
249 | backends will be tried (in the reverse order as given here). If none are |
… | |
… | |
271 | <dd> |
272 | <dd> |
272 | <p>This function reinitialises the kernel state for backends that have |
273 | <p>This function reinitialises the kernel state for backends that have |
273 | one. Despite the name, you can call it anytime, but it makes most sense |
274 | one. Despite the name, you can call it anytime, but it makes most sense |
274 | after forking, in either the parent or child process (or both, but that |
275 | after forking, in either the parent or child process (or both, but that |
275 | again makes little sense).</p> |
276 | again makes little sense).</p> |
276 | <p>You <i>must</i> call this function after forking if and only if you want to |
277 | <p>You <i>must</i> call this function in the child process after forking if and |
277 | use the event library in both processes. If you just fork+exec, you don't |
278 | only if you want to use the event library in both processes. If you just |
278 | have to call it.</p> |
279 | fork+exec, you don't have to call it.</p> |
279 | <p>The function itself is quite fast and it's usually not a problem to call |
280 | <p>The function itself is quite fast and it's usually not a problem to call |
280 | it just in case after a fork. To make this easy, the function will fit in |
281 | it just in case after a fork. To make this easy, the function will fit in |
281 | quite nicely into a call to <code>pthread_atfork</code>:</p> |
282 | quite nicely into a call to <code>pthread_atfork</code>:</p> |
282 | <pre> pthread_atfork (0, 0, ev_default_fork); |
283 | <pre> pthread_atfork (0, 0, ev_default_fork); |
283 | |
284 | |