3 ms·
That's a good point, and one I hadn't thought of. I wonder what it would take to wrap Unix.fork into a threading library to make threads more convenient?
by jeffreyrogers 12y ago
That's a good point, and one I hadn't thought of. I wonder what it would take to wrap Unix.fork into a threading library to make threads more convenient?
- logicchains 12y agoThere are apparently some such libraries already. I haven't used any, but they seem to all use process-level threading; there's no lightweight threading library (like Lwt) that uses real threads. Actually, I'm wrong; turns out it is possible to delegate Lwt threads to system threads: http://ocsigen.org/lwt/api/Lwt_preemptive http://ocsigen.org/lwt/api/Lwt_preemptive. This model doesn't seem to allow communication between them, however. 1.http://projects.camlcity.org/projects/dl/ocamlnet-3.3.0test1/doc/html-main/Netmcore_tut.html http://projects.camlcity.org/projects/dl/ocamlnet-3.3.0test1... 2.http://www.dicosmo.org/code/parmap/ http://www.dicosmo.org/code/parmap/ 3. https://github.com/UnixJunkie/ocamlmpi https://github.com/UnixJunkie/ocamlmpi 4. https://github.com/MyLifeLabs/nproc https://github.com/MyLifeLabs/nproc