* [Caml-list] ocaml systhreads condition variables: no condvar_timedwait?
@ 2013-03-11 22:17 Chet Murthy
2013-03-11 23:09 ` oliver
0 siblings, 1 reply; 4+ messages in thread
From: Chet Murthy @ 2013-03-11 22:17 UTC (permalink / raw)
To: OCaml List
I'm just starting to use Ocaml threads, and notice that there's no
equivalent of pthread_condvar_timedwait. It seems pretty clear (and
easy) how to implement this for POSIX, but I don't know diddly about
how one might do so on Windows, nor have I looked into howto implement
it on vmthreads.
Has anybody already stumbled across this issue and resolved it? (a
modest Google search reveals nothing).
Thanks,
--chet--
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Caml-list] ocaml systhreads condition variables: no condvar_timedwait?
2013-03-11 22:17 [Caml-list] ocaml systhreads condition variables: no condvar_timedwait? Chet Murthy
@ 2013-03-11 23:09 ` oliver
2013-03-11 23:11 ` Chet Murthy
0 siblings, 1 reply; 4+ messages in thread
From: oliver @ 2013-03-11 23:09 UTC (permalink / raw)
To: Chet Murthy; +Cc: OCaml List
On Mon, Mar 11, 2013 at 03:17:13PM -0700, Chet Murthy wrote:
>
> I'm just starting to use Ocaml threads, and notice that there's no
> equivalent of pthread_condvar_timedwait.
[...]
I looked up this function and found nothing.
It seems this is your personal phantasy function,
or possibly just a typo.
Possibly you mean
pthread_cond_timedwait()
Ciao,
Oliver
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Caml-list] ocaml systhreads condition variables: no condvar_timedwait?
2013-03-11 23:09 ` oliver
@ 2013-03-11 23:11 ` Chet Murthy
2013-03-12 0:25 ` Markus Mottl
0 siblings, 1 reply; 4+ messages in thread
From: Chet Murthy @ 2013-03-11 23:11 UTC (permalink / raw)
To: oliver; +Cc: OCaml List
Oops, sorry, yes, I meant pthread_cond_timedwait(). In any case, it's
not wrappered in Ocaml systhreads, though clearly from the
implementation of pthread_cond_wait() (well, "st_condvar_wait" in
st_posix.h), it's trivial to add.
Just wondering why it was omitted, is all.
--chet--
On Tuesday, March 12, 2013 12:09:45 AM oliver wrote:
> On Mon, Mar 11, 2013 at 03:17:13PM -0700, Chet Murthy wrote:
> > I'm just starting to use Ocaml threads, and notice that there's no
> > equivalent of pthread_condvar_timedwait.
>
> [...]
>
> I looked up this function and found nothing.
> It seems this is your personal phantasy function,
> or possibly just a typo.
>
> Possibly you mean
> pthread_cond_timedwait()
>
> Ciao,
> Oliver
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Caml-list] ocaml systhreads condition variables: no condvar_timedwait?
2013-03-11 23:11 ` Chet Murthy
@ 2013-03-12 0:25 ` Markus Mottl
0 siblings, 0 replies; 4+ messages in thread
From: Markus Mottl @ 2013-03-12 0:25 UTC (permalink / raw)
To: Chet Murthy; +Cc: oliver, OCaml List
On Mon, Mar 11, 2013 at 7:11 PM, Chet Murthy <murthy.chet@gmail.com> wrote:
> Oops, sorry, yes, I meant pthread_cond_timedwait(). In any case, it's
> not wrappered in Ocaml systhreads, though clearly from the
> implementation of pthread_cond_wait() (well, "st_condvar_wait" in
> st_posix.h), it's trivial to add.
>
> Just wondering why it was omitted, is all.
FWIW, the Jane Street Core library implements this function in
Core.Std.Condition.timedwait. I think it should be part of the
standard library, too, since it's a POSIX standard.
Regards,
Markus
--
Markus Mottl http://www.ocaml.info markus.mottl@gmail.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-03-12 0:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-11 22:17 [Caml-list] ocaml systhreads condition variables: no condvar_timedwait? Chet Murthy
2013-03-11 23:09 ` oliver
2013-03-11 23:11 ` Chet Murthy
2013-03-12 0:25 ` Markus Mottl
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox