* [Caml-list] interesting (unexpected) sideeffect
@ 2011-09-13 11:35 Matej Kosik
2011-09-13 18:44 ` Gerd Stolpmann
0 siblings, 1 reply; 2+ messages in thread
From: Matej Kosik @ 2011-09-13 11:35 UTC (permalink / raw)
To: caml-list
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?
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Caml-list] interesting (unexpected) sideeffect
2011-09-13 11:35 [Caml-list] interesting (unexpected) sideeffect Matej Kosik
@ 2011-09-13 18:44 ` Gerd Stolpmann
0 siblings, 0 replies; 2+ messages in thread
From: Gerd Stolpmann @ 2011-09-13 18:44 UTC (permalink / raw)
To: Matej Kosik; +Cc: caml-list
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.
------------------------------------------------------------
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-09-13 18:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-13 11:35 [Caml-list] interesting (unexpected) sideeffect Matej Kosik
2011-09-13 18:44 ` Gerd Stolpmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox