Is INRIA going to add concurrency primitives to OCaml?

被刻印的时光 ゝ 提交于 2019-12-04 01:13:23

no

I cannot be more concise without reproducing his explanation. It speaks for itself. Yes, this is from 2002, but I haven't heard him sway on the issue, and from the text, it doesn't seem probable at all that he would back down from these goals.

For current developments on concurrent functional programming, possibly MPI solutions (with ocaml bindings) might be a solution to your problem. Obviously this is not shared memory parallelism. There is also concurrent ML.

There is J&oCaml, which is …

Objective Caml plus (&) the join calculus, that is, OCaml extended for concurrent and distributed programming.

The Thread module in the standard library provides concurrency primitives, and has been around for quite a while. There are also third party libraries which provide higher-level / different concurrency APIs.

But it sounds like you are conflating concurrency and parallelism.

OCaml of course doesn't get in the way of parallelism. You can run OCaml on thousands or millions of machines at the same time. There are even MPI bindings to make it easier to program for massively parallel supercomputers. But the current reference OCaml implementation will not automatically parallelize concurrent programs, which I think is what you're really more interested in.

You may be interested in Multicore OCaml which provides better support for shared memory parallelism, as SMP computers have become quite prevalent over the last couple decades and it would be really nice to more easily optimize for them. They appear to be making slow but steady progress and trying to get it right.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!