… | |
… | |
130 | .\} |
130 | .\} |
131 | .rm #[ #] #H #V #F C |
131 | .rm #[ #] #H #V #F C |
132 | .\" ======================================================================== |
132 | .\" ======================================================================== |
133 | .\" |
133 | .\" |
134 | .IX Title "LIBEV 3" |
134 | .IX Title "LIBEV 3" |
135 | .TH LIBEV 3 "2008-06-19" "libev-3.43" "libev - high performance full featured event loop" |
135 | .TH LIBEV 3 "2008-07-05" "libev-3.43" "libev - high performance full featured event loop" |
136 | .\" For nroff, turn off justification. Always turn off hyphenation; it makes |
136 | .\" For nroff, turn off justification. Always turn off hyphenation; it makes |
137 | .\" way too many mistakes in technical documents. |
137 | .\" way too many mistakes in technical documents. |
138 | .if n .ad l |
138 | .if n .ad l |
139 | .nh |
139 | .nh |
140 | .SH "NAME" |
140 | .SH "NAME" |
… | |
… | |
3273 | parallel from multiple threads, calls with the same loop parameter must be |
3273 | parallel from multiple threads, calls with the same loop parameter must be |
3274 | done serially (but can be done from different threads, as long as only one |
3274 | done serially (but can be done from different threads, as long as only one |
3275 | thread ever is inside a call at any point in time, e.g. by using a mutex |
3275 | thread ever is inside a call at any point in time, e.g. by using a mutex |
3276 | per loop). |
3276 | per loop). |
3277 | .PP |
3277 | .PP |
3278 | If you want to know which design is best for your problem, then I cannot |
3278 | If you want to know which design (one loop, locking, or multiple loops |
3279 | help you but by giving some generic advice: |
3279 | without or something else still) is best for your problem, then I cannot |
|
|
3280 | help you. I can give some generic advice however: |
3280 | .IP "\(bu" 4 |
3281 | .IP "\(bu" 4 |
3281 | most applications have a main thread: use the default libev loop |
3282 | most applications have a main thread: use the default libev loop |
3282 | in that thread, or create a separate thread running only the default loop. |
3283 | in that thread, or create a separate thread running only the default loop. |
3283 | .Sp |
3284 | .Sp |
3284 | This helps integrating other libraries or software modules that use libev |
3285 | This helps integrating other libraries or software modules that use libev |