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
I have a feature wish: I would like to get rid of the ThreadUnix module;
instead,
the -thread option should automatically select a thread-aware version of Unix.
The advantages:
When programming, you need not look up whether a Unix function is also defined
in
ThreadUnix.
It is simpler to write packages (collections of related modules) that
work for both single- and multi-threaded applications. Often, one can avoid
global states, and the only problem to make such packages thread-aware are
calls of Unix functions. Currently, it is very complicated to provide two
versions of such packages, one for single- and one for multi-threaded
applications (the versions differ only in some invocations of Unix).
It is simpler for you to keep the interfaces of both Unix versions
synchronized.
Note that the latter is currently not the case:
val Unix.socket : domain:socket_domain -> kind:socket_type -> protocol:int ->
file_descr
val ThreadUnix.socket : domain:Unix.socket_domain -> kind:Unix.socket_type ->
proto:int -> file_descr
The labels are different.
All the best,
Gerd Stolpmann
The text was updated successfully, but these errors were encountered:
Original bug ID: 186
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: feature
Category: ~DO NOT USE (was: OCaml general)
Bug description
Full_Name: Gerd Stolpmann
Version: 3.00
OS:
Submission from: p3e9e0ea8.dip0.t-ipconnect.de (62.158.14.168)
Hello,
I have a feature wish: I would like to get rid of the ThreadUnix module;
instead,
the -thread option should automatically select a thread-aware version of Unix.
The advantages:
in
ThreadUnix.
work for both single- and multi-threaded applications. Often, one can avoid
global states, and the only problem to make such packages thread-aware are
calls of Unix functions. Currently, it is very complicated to provide two
versions of such packages, one for single- and one for multi-threaded
applications (the versions differ only in some invocations of Unix).
synchronized.
Note that the latter is currently not the case:
val Unix.socket : domain:socket_domain -> kind:socket_type -> protocol:int ->
file_descr
val ThreadUnix.socket : domain:Unix.socket_domain -> kind:Unix.socket_type ->
proto:int -> file_descr
The labels are different.
All the best,
Gerd Stolpmann
The text was updated successfully, but these errors were encountered: