Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wish: Get rid of ThreadUnix #2565

Closed
vicuna opened this issue Sep 6, 2000 · 1 comment
Closed

Wish: Get rid of ThreadUnix #2565

vicuna opened this issue Sep 6, 2000 · 1 comment

Comments

@vicuna
Copy link

vicuna commented Sep 6, 2000

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:

  • 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

@vicuna
Copy link
Author

vicuna commented Jun 25, 2001

Comment author: administrator

Done 2001-06-25 by XL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant