3 ms·
I'm very excited for this! I remember seeing a presentation a few years ago that mentioned that OCaml could use effect handlers to implement preemption in fiber
by dgllghr 6y ago
I'm very excited for this! I remember seeing a presentation a few years ago that mentioned that OCaml could use effect handlers to implement preemption in fibers. I can't seem to find that presentation, but I believe it mentioned being able to interrupt a fiber with an effect. Is that something that is in the plans or was that just an early idea?
- sadiq 6y agoWas this the paper? https://www.repository.cam.ac.uk/bitstream/handle/1810/283239/paper.pdf https://www.repository.cam.ac.uk/bitstream/handle/1810/28323... Effects that 'interrupt' a fiber are asynchronous effects. They can be used to implement schedulers and the like. We don't currently support them in Multicore, there's still a few open research questions as to how to reconile them with the effect system.
- dgllghr 6y agoCool! Glad to hear there is still work being done there. I was able to find the presentation I was thinking of: https://kcsrk.info/slides/handlers_edinburgh.pdf https://kcsrk.info/slides/handlers_edinburgh.pdf Specifically the part about Preemptive Multithreading