From: Gerd Stolpmann <info@gerd-stolpmann.de>
To: Matej Kosik <kosik@fiit.stuba.sk>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] interesting (unexpected) sideeffect
Date: Tue, 13 Sep 2011 20:44:52 +0200 [thread overview]
Message-ID: <1315939492.7337.4.camel@thinkpad> (raw)
In-Reply-To: <4E6F400C.8020303@fiit.stuba.sk>
Am Dienstag, den 13.09.2011, 13:35 +0200 schrieb Matej Kosik:
> Hi,
>
> I have noticed that when I compile my program with
>
> ocamlc -vmthread ... threads.cma ...
>
> options, then
>
> Unix.set_nonblock
>
> function does not work. I.e. Unix.recv function called with a given
> socket can block. Is this an intended behavior?
Maybe not intended, but accepted (I reported that already years ago).
The VM threads have serious limits, and are not meant as a replacement
for kernel threads. So, some properties of file descriptors are always
reset on occasion (VM context switch, or Unix.select). I guess it is too
difficult to get this right.
Gerd
--
------------------------------------------------------------
Gerd Stolpmann, Darmstadt, Germany gerd@gerd-stolpmann.de
Creator of GODI and camlcity.org.
Contact details: http://www.camlcity.org/contact.html
Company homepage: http://www.gerd-stolpmann.de
*** Searching for new projects! Need consulting for system
*** programming in Ocaml? Gerd Stolpmann can help you.
------------------------------------------------------------
prev parent reply other threads:[~2011-09-13 18:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-13 11:35 Matej Kosik
2011-09-13 18:44 ` Gerd Stolpmann [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1315939492.7337.4.camel@thinkpad \
--to=info@gerd-stolpmann.de \
--cc=caml-list@yquem.inria.fr \
--cc=kosik@fiit.stuba.sk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox