Problems? Is your data what you think it is? | |
PerlMonks |
Re: System call doesn't work when there is a large amount of data in a hashby marioroy (Prior) |
on Apr 29, 2020 at 17:19 UTC ( [id://11116227]=note: print w/replies, xml ) | Need Help?? |
Hi Nicolasd, One may spin up a worker early and communicate via a channel. The worker makes the system call and notifies once completed. The 'Simple' channel is specified due to just one background worker (i.e. no mutex locking needed). Otherwise, 'Mutex' is the default when not specified. Lastly, this works on Unix OSes and Windows. Update: Pass back the status. See system on PerlDocs for how to inspect the status.
The background worker awaits for the next system call to make. Waiting involves no CPU time. No hash copy either because the worker is spun early. See also Child in meta::cpan. Regards, Mario
In Section
Seekers of Perl Wisdom
|
|