<yziquel>
gildor: what happens if i'm waiting in a Thread.select and, meanwhile, i close one of the file descriptors it's waiting on? Will it continue to wait for some event on another file descriptor, or just raise an error?
<gildor>
yziquel: I think it will raise an error
<yziquel>
gildor: hmm. Painful. Lots of mutexes to use, then... thanks.
Associat0r has quit []
<Yoric[DT]>
yziquel: unless I'm mistaken, OCamlNet's equeue has a much more friendly interface than Unix.select.
itewsh has joined #ocaml
<yziquel>
Yoric[DT]: thanks. I'll have a look at it at some point.
<Yoric[DT]>
The site seems down at the moment, though.
<yziquel>
i've got another issue (will look at equeue later on): I'd like thread 1 to wait for thread 1 to get in the Thread.select statement. I want thread 1 to resume activity only when I'm sure that thread 2 is listening. Anyone has suggestions on how to do that?
<yziquel>
Sorry: I'd like thread 1 to wait for thread 2 (not 1).
ozy` has quit [Read error: 110 (Connection timed out)]
<Yoric[DT]>
Well, you can try playing with Condition and Event.
itewsh has quit [Remote closed the connection]
pantsd has quit [Read error: 110 (Connection timed out)]
pantsd has joined #ocaml
ozy` has joined #ocaml
Linktim_ has quit ["Quitte"]
Linktim has joined #ocaml
filp has quit [Read error: 110 (Connection timed out)]
filp has joined #ocaml
<yziquel>
Yoric[DT]: As far as I understand these two modules, they are not satisfying: The condition that I need is "waiting in Thread.select"... Can't trigger it before being in Thread.select (race condition), and can't trigger after Thread.select, 'cause I'd be waiting in Thread.select for quite a long time... As for the Event library, the situation seems to be the same.
Submarine_ has joined #ocaml
Submarine_ has quit ["Leaving"]
filp has quit ["Bye"]
yziquel has quit [Read error: 104 (Connection reset by peer)]
yziquel has joined #ocaml
Axioplase has joined #ocaml
<yziquel>
Sorry, had trouble with my computer. To sum up, what would be really great would be to have a Condition.select statement, doing the same thing as Thread.select, and sending a signal to the other threads waiting for that signal. Can this be done?
Axioplase is now known as Axioplase_
yziquel has left #ocaml []
<Yoric[DT]>
Sorry, I haven't toyed with select, so I'm not sure.
<Yoric[DT]>
There's an Event.select, though, isn't it?
yziquel has joined #ocaml
pantsd has quit [Read error: 110 (Connection timed out)]
pantsd has joined #ocaml
<flux>
I suppose the Event-module can be used for most synchronizaton purposes
<flux>
..once you get the idea on how to use it :)
<flux>
the first time I saw its interface it didn't quite dawn on me; I had to refer to concurent ml documentation to get it
filp has joined #ocaml
<Yoric[DT]>
I actually liked it when I saw it first.
<Yoric[DT]>
I just haven't used it many times -- and never in conjunction with Unix.
<flux>
it's difficult to interface anything non-file with Unix.select..
<flux>
you basically need to have another thread with a pipe that feeds stuff to it
<flux>
(or process)
<flux>
I suppose it might be possible with signals and polling too, but using a pipe sounds more robust
filp has quit ["Bye"]
GustNG1 has joined #ocaml
GustNG2 has joined #ocaml
GustNG has quit [Read error: 110 (Connection timed out)]
fremo has quit ["leaving"]
GustNG1 has quit [Read error: 110 (Connection timed out)]
davidm123 has joined #ocaml
<davidm123>
is there a recommended way to build mingw binaries under a cygwin version of ocamlc?
<davidm123>
I tried "ocamlc -custom -verbose -ccopt '-mno-cygwin' ...", but that tries to link to /usr/lib/ocaml/libcamlrun.a (a cygwin library)
hkBst has quit [Read error: 104 (Connection reset by peer)]
<Yoric[DT]>
Mmmhh....
<Yoric[DT]>
I'm trying to compile a file foo_bar.ml as if it were module foo.ml .
<Yoric[DT]>
Any idea?
Snark has quit ["Ex-Chat"]
<Yoric[DT]>
(technically, I have a module which I want to compile both as a Mylibrary.cma and Mylibrary_nothreads.cma)
<Yoric[DT]>
My explanations are unclear.
<Yoric[DT]>
Let me restart.
<Yoric[DT]>
I have two modules, one defined in a.ml and the other one defined in a_nothreads.ml .
<Yoric[DT]>
I would like to compile them respectively to a.cma and a_nothreads.cma .
<Yoric[DT]>
Now, they define the same interface, except one works when linked with -thread and the other one when not linked with -thread.
<Yoric[DT]>
So I'd like both of them to define the same module A.
<Yoric[DT]>
Of course, with a.ml and a_nothreads.ml, I'm going to end up rather with two distinct modules A and A_nothreads .
<Yoric[DT]>
Which is not as nice.
<bacam>
But for some reason you want to avoid a separate nothreads directory?
<Yoric[DT]>
Any idea?
<Yoric[DT]>
Well, I can't think of any way of having two fully separate directories with OCamlBuild.
<bacam>
Ah, I've no experience of ocamlbuild.
<Yoric[DT]>
Yeah, with a regular Makefile, it wouldn't be too hard.
<Yoric[DT]>
Mmmhh... I may have an idea.
<Yoric[DT]>
Ok, separate subdirectories are possible with ocamlbuild, after all.
Axioplase_ is now known as Axioplase
<Yoric[DT]>
Gasp.
<Yoric[DT]>
Except something is bound to fail.
<Yoric[DT]>
Mmmhh....
<Yoric[DT]>
Well, I guess I'm going to make two distinct findlib packages, after all.
Palace_Chan has joined #ocaml
jlouis has quit ["Leaving"]
jlouis has joined #ocaml
Amorphous has quit [Read error: 104 (Connection reset by peer)]
Amorphous has joined #ocaml
<palomer>
:O>
jlouis has quit ["Leaving"]
jlouis has joined #ocaml
yziquel has quit [Read error: 110 (Connection timed out)]
Submarine has quit [Read error: 110 (Connection timed out)]
comglz has joined #ocaml
ofaurax has joined #ocaml
Palace_Chan has quit ["Palace goes to sleep"]
comglz has quit ["AddToFunc ExitFunction I Exec exec sudo halt"]
Linktim has quit ["Quitte"]
Yoric[DT] has quit ["Ex-Chat"]
_JusSx_ has joined #ocaml
_JusSx_ has quit [Client Quit]
johnnowak has joined #ocaml
yziquel has joined #ocaml
snhmib has joined #ocaml
yziquel has quit [Read error: 110 (Connection timed out)]