ilxl has asked for the wisdom of the Perl Monks concerning the following question:
Since threads of Perl has memory leak problem, I tried to use Coro. Is the following code correct? Thanks. Will async_pool be better?
use Coro; while (1) { async { &start_process(); } cede; //I found that without "cede;", start_process() will not run } sub start_process { ... }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Use Coro for multi-threads, is this right?
by Corion (Patriarch) on Feb 24, 2010 at 07:44 UTC | |
|
Re: Use Coro for multi-threads, is this right?
by ambrus (Abbot) on Feb 24, 2010 at 08:42 UTC | |
|
Re: Use Coro for multi-threads, is this right?
by BrowserUk (Patriarch) on Feb 24, 2010 at 09:14 UTC | |
|
Re: Use Coro for multi-threads, is this right?
by Anonymous Monk on Feb 24, 2010 at 07:12 UTC | |
by ilxl (Initiate) on Feb 24, 2010 at 07:59 UTC | |
|
Re: Use Coro for multi-threads, is this right?
by ikegami (Patriarch) on Feb 24, 2010 at 07:50 UTC |