in reply to Re: Is is possible to use perl fork and ithreads within the same application
in thread Is is possible to use perl fork and ithreads within the same application

The reason for wanting to mix the two is that I have to open up 300+ connections to unique devices.

You don't tell what kind of connection that is, and what amount of code is involved interacting with those devices. Maybe you could make the connections into just (file)handles using pipe before forking, and IO::Select in the parent. If the creation and interaction with those devices is asynchronous (i.e. random wrt time), you could use an event based model using Event, EV or POE. That way your forked processes will be small enough, and will be returning claimed memory to the OS after execution. This is given with a lot of handwaving, of course; more of your code is required to give good advice.

perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'
  • Comment on Re^2: Is is possible to use perl fork and ithreads within the same application