Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Can we write multi-threaded scripts ?

by jimpudar (Pilgrim)
on Nov 05, 2018 at 17:32 UTC ( [id://1225281] : note . print w/replies, xml ) Need Help??


in reply to Can we write multi-threaded scripts ?

You may also want to take a look at Mojo::IOLoop::Subprocess, new in Mojolicious 8.0.

This lets you use normal asynchronous programming style to spawn processes for background work.

If your work is not CPU bound, you may consider just using asynchronous calls in a single process (see Mojo::IOLoop).

Best

Jim

πάντων χρημάτων μέτρον έστιν άνθρωπος.

  • Comment on Re: Can we write multi-threaded scripts ?