Add $thr->detach; after the create.
On my system I reach a steady state memory usage of around 2.7 MB after a few seconds.
That's with threads v1.71. (YMMV with earlier versions).
In reply to Re: using many threads and conserving stack size
by BrowserUk
in thread using many threads and conserving stack size
by danmcb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |