5 ms·
What about OCaml and concurrency ? what are the options out there ? after reading : http://roscidus.com/blog/blog/2013/09/28/ocaml-objects/ http://roscidus.co
by aikah 11y ago
What about OCaml and concurrency ? what are the options out there ?
after reading :
http://roscidus.com/blog/blog/2013/09/28/ocaml-objects/ http://roscidus.com/blog/blog/2013/09/28/ocaml-objects/
the language sounds quite interesting. Does it support something like channels ?
- krat0sprakhar 11y agoOT: Yaron Minsky has a rather interesting view on concurrency in OCaml. Do checkout his latest interview on SE Daily - http://softwareengineeringdaily.com/2015/11/09/automated-trading-and-ocaml-with-yaron-minsky/ http://softwareengineeringdaily.com/2015/11/09/automated-tra...
- masklinn 11y agoLWT (a popular IO library) has channels: https://ocsigen.org/lwt/dev/api/Lwt_io https://ocsigen.org/lwt/dev/api/Lwt_io That's what TFAA (and MirageOS) use.
- vog 11y agoForgive my ignorance, but what is TFAA? All my web searches yield irrelevant results, such as "Triveni Faridabad Allottees Association" or "Trifluoroacetic anhydride".
- bkirkbri 11y agoLWT's channels look more like filehandles. I think the GP was asking about channels in the CSP sense. It looks like LWT has that too in the form of streams.
- jallmann 11y agoThe canonical way to do concurrency these days is with a monadic library like Lwt or Async, which is a mechanism akin to promises/deferreds. They have their own implementations of channels/events/streams/what-call-you-it. There is some interesting work being done on an effects system [1] which would be another option for type-safe concurrency, hopefully it will land soon alongside the multicore work. There is also the old fashioned way with the stdlib's Event module[2] (in conjunction with Thread), but that's not used as often, mostly because Lwt/Async offer richer, safer abstractions. [1] http://kcsrk.info/ocaml/multicore/2015/05/20/effects-multicore/ http://kcsrk.info/ocaml/multicore/2015/05/20/effects-multico... [2] http://caml.inria.fr/pub/docs/manual-ocaml/libref/Event.html http://caml.inria.fr/pub/docs/manual-ocaml/libref/Event.html