--- libev/ev.3 2012/11/15 01:39:45 1.96 +++ libev/ev.3 2013/02/18 03:20:28 1.97 @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "LIBEV 3" -.TH LIBEV 3 "2012-11-13" "libev-4.11" "libev - high performance full featured event loop" +.TH LIBEV 3 "2013-02-18" "libev-4.11" "libev - high performance full featured event loop" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -689,7 +689,7 @@ cause an extra system call as with \f(CW\*(C`EVBACKEND_EPOLL\*(C'\fR, it still adds up to two event changes per incident. Support for \f(CW\*(C`fork ()\*(C'\fR is very bad (you might have to leak fd's on fork, but it's more sane than epoll) and it -drops fds silently in similarly hard-to-detect cases +drops fds silently in similarly hard-to-detect cases. .Sp This backend usually performs well under most conditions. .Sp @@ -1510,8 +1510,8 @@ active, pending and so on. In this section these states and the rules to transition between them will be described in more detail \- and while these rules might look complicated, they usually do \*(L"the right thing\*(R". -.IP "initialiased" 4 -.IX Item "initialiased" +.IP "initialised" 4 +.IX Item "initialised" Before a watcher can be registered with the event loop it has to be initialised. This can be done with a call to \f(CW\*(C`ev_TYPE_init\*(C'\fR, or calls to \&\f(CW\*(C`ev_init\*(C'\fR followed by the watcher-specific \f(CW\*(C`ev_TYPE_set\*(C'\fR function. @@ -2742,8 +2742,9 @@ .IX Subsection "ev_stat - did the file attributes just change?" This watches a file system path for attribute changes. That is, it calls \&\f(CW\*(C`stat\*(C'\fR on that path in regular intervals (or when the \s-1OS\s0 says it changed) -and sees if it changed compared to the last time, invoking the callback if -it did. +and sees if it changed compared to the last time, invoking the callback +if it did. Starting the watcher \f(CW\*(C`stat\*(C'\fR's the file, so only changes that +happen after the watcher has been started will be reported. .PP The path does not need to exist: changing from \*(L"path exists\*(R" to \*(L"path does not exist\*(R" is a status change like any other. The condition \*(L"path does not @@ -3318,8 +3319,8 @@ .IP "ev_embed_init (ev_embed *, callback, struct ev_loop *embedded_loop)" 4 .IX Item "ev_embed_init (ev_embed *, callback, struct ev_loop *embedded_loop)" .PD 0 -.IP "ev_embed_set (ev_embed *, callback, struct ev_loop *embedded_loop)" 4 -.IX Item "ev_embed_set (ev_embed *, callback, struct ev_loop *embedded_loop)" +.IP "ev_embed_set (ev_embed *, struct ev_loop *embedded_loop)" 4 +.IX Item "ev_embed_set (ev_embed *, struct ev_loop *embedded_loop)" .PD Configures the watcher to embed the given loop, which must be embeddable. If the callback is \f(CW0\fR, then \f(CW\*(C`ev_embed_sweep\*(C'\fR will be @@ -3783,9 +3784,9 @@ A common way around all these issues is to make sure that \&\f(CW\*(C`start_new_request\*(C'\fR \fIalways\fR returns before the callback is invoked. If \&\f(CW\*(C`start_new_request\*(C'\fR immediately knows the result, it can artificially -delay invoking the callback by e.g. using a \f(CW\*(C`prepare\*(C'\fR or \f(CW\*(C`idle\*(C'\fR watcher -for example, or more sneakily, by reusing an existing (stopped) watcher -and pushing it into the pending queue: +delay invoking the callback by using a \f(CW\*(C`prepare\*(C'\fR or \f(CW\*(C`idle\*(C'\fR watcher for +example, or more sneakily, by reusing an existing (stopped) watcher and +pushing it into the pending queue: .PP .Vb 2 \& ev_set_cb (watcher, callback); @@ -3804,7 +3805,7 @@ main \f(CW\*(C`ev_run\*(C'\fR call, but not the nested one (e.g. user clicked \*(L"Quit\*(R", but a modal \*(L"Are you sure?\*(R" dialog is still waiting), or just the nested one and not the main one (e.g. user clocked \*(L"Ok\*(R" in a modal dialog), or some -other combination: In these cases, \f(CW\*(C`ev_break\*(C'\fR will not work alone. +other combination: In these cases, a simple \f(CW\*(C`ev_break\*(C'\fR will not work. .PP The solution is to maintain \*(L"break this loop\*(R" variable for each \f(CW\*(C`ev_run\*(C'\fR invocation, and use a loop around \f(CW\*(C`ev_run\*(C'\fR until the condition is