Re:The Rust standard library no longer has any scheduling ba...
by wcummings on Sunday December 29, 2013 @06:44PM
(#6982136)
You can create threads with enif_thread_create and build a queue to handle long running tasks (or a pool of threads), and use enif_send to return the result. Not quite as hacky as it sounds, since afaik port drivers rely on message passing to return values to the VM as well. Maybe not ideal, but better than naively bumping reductions. I haven't played with enif_timeslice yet, so I'm not sure how it compares (it's newer than NIF threads).
[ Parent
| on HN ]
There are no comments on this comment yet.