… | |
… | |
329 | A workaround is to call "Coro::Multicore::enable 0" after a fork to |
329 | A workaround is to call "Coro::Multicore::enable 0" after a fork to |
330 | disable the module. |
330 | disable the module. |
331 | |
331 | |
332 | Future versions of this module might do this automatically. |
332 | Future versions of this module might do this automatically. |
333 | |
333 | |
334 | BUGS |
334 | BUGS & LIMITATIONS |
335 | (OS-) threads are never released |
335 | (OS-) threads are never released |
336 | At the moment, threads that were created once will never be freed. |
336 | At the moment, threads that were created once will never be freed. |
337 | They will be reused for asynchronous requests, though, so as long as |
337 | They will be reused for asynchronous requests, though, so as long as |
338 | you limit the maximum number of concurrent asynchronous tasks, this |
338 | you limit the maximum number of concurrent asynchronous tasks, this |
339 | will also limit the maximum number of threads created. |
339 | will also limit the maximum number of threads created. |
… | |
… | |
342 | GNU/Linux + glibc, each thread takes about 8KiB of userspace memory |
342 | GNU/Linux + glibc, each thread takes about 8KiB of userspace memory |
343 | + whatever the kernel needs (probably less than 8KiB). |
343 | + whatever the kernel needs (probably less than 8KiB). |
344 | |
344 | |
345 | Future versions will likely lift this limitation. |
345 | Future versions will likely lift this limitation. |
346 | |
346 | |
347 | AnyEvent is initalised at module load time |
347 | The enable_times feature of Coro is messed up |
348 | AnyEvent is initialised on module load, as opposed to at a later |
348 | The enable_times feature uses the per-thread timer to measure |
349 | time. |
349 | per-thread execution time, but since Coro::Multicore runs threads on |
|
|
350 | different pthreads it will get the wrong times. Real times are not |
|
|
351 | affected. |
350 | |
352 | |
351 | Future versions will likely change this. |
353 | Fork support |
|
|
354 | Due to the nature of threads, you are not allowed to use this module |
|
|
355 | in a forked child normally, with one exception: If you don't create |
|
|
356 | any threads in the parent, then it is safe to start using it in a |
|
|
357 | forked child. |
352 | |
358 | |
353 | AUTHOR |
359 | AUTHOR |
354 | Marc Lehmann <schmorp@schmorp.de> |
360 | Marc Lehmann <schmorp@schmorp.de> |
355 | http://software.schmorp.de/pkg/AnyEvent-XSThreadPool.html |
361 | http://software.schmorp.de/pkg/AnyEvent-XSThreadPool.html |
356 | |
362 | |