in reply to Re: from pseudofork to threads
in thread from pseudofork to threads
You can detach in the first loop, but as whether it is safe, really depeneds on what the child thread is doing.
When the main thread exit, all child threads will be shut down at unpredictable point, it might seriously hurt what you are doing (, again really depends what it is doing).
As far as Perl is concerned, that doesn't matter, although it will warn you that you exit when some threads running.