You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, we only say that the synchronisation primitives (promises, etc) can be safely shared between domains. However, we need to allow at least some other things (e.g. the file-system and network) to be shared as otherwise there's no way to use them from other domains. Probably all of Stdenv should be shareable.
For Unix, this may require some fairly heavy-weight reference counting to ensure that we never close a file descriptor while it's being used by another thread (which might include it being queued up in another domain's io_uring queue, for example). Unix is quick to reuse FD numbers once closed, which can easily lead to corrupting an unrelated file.
Also, we should document whether you can do e.g. overlapping writes on a flow. For example, whether this always writes "AB" to the flow f (see e.g. mirleft/ocaml-tls#458):
Fiber.both
(fun() -> Flow.write f "A")
(fun() -> Flow.write f "B")
The text was updated successfully, but these errors were encountered:
Currently, we only say that the synchronisation primitives (promises, etc) can be safely shared between domains. However, we need to allow at least some other things (e.g. the file-system and network) to be shared as otherwise there's no way to use them from other domains. Probably all of
Stdenv
should be shareable.For Unix, this may require some fairly heavy-weight reference counting to ensure that we never close a file descriptor while it's being used by another thread (which might include it being queued up in another domain's io_uring queue, for example). Unix is quick to reuse FD numbers once closed, which can easily lead to corrupting an unrelated file.
Also, we should document whether you can do e.g. overlapping writes on a flow. For example, whether this always writes "AB" to the flow
f
(see e.g. mirleft/ocaml-tls#458):The text was updated successfully, but these errors were encountered: