From: ronniec95@lineone.net
To: Olivier Andrieu <andrieu@ijm.jussieu.fr>, caml-list@inria.fr
Subject: Re: [Caml-list] Interfacing C threads with Ocaml - weird bug
Date: Wed, 3 Apr 2002 21:20:25 +0400 [thread overview]
Message-ID: <20020403172025.GA3487@cradle.net.ae> (raw)
In-Reply-To: <15531.9799.220007.210452@akasha.ijm.jussieu.fr>
On Wednesday 03 April 2002 at 16:43PM, Olivier Andrieu attributed that:
> ronniec95@lineone.net [Tuesday 2 April 2002] :
> >
> > Hi guys,
> >
> > I've written a Ocaml interface for an C-API. It sets up some parameters
> > (all works) then starts a thread pool (C). I then call a mainloop
> > function that contains a while loop that, upon receiving a request
> > dispatches the event to a C callback.
> >
> > OCAML:
> > let receiver () =
> > let _ = Tib.opent ()
> > and tport = Tib.create_transport "" "" ""
> > and queue = Tib.default_queue () in
>
> (...)
>
> > Any ideas (very) helpful.
>
> Hi, maybe you've solved your problem already but I have a comment on
> your code :
> you use ? let _ = ... and tport = ... and queue = ... ?. Now I'm not
> sure in which order the evaluation takes place in case of ? let
> ... and ... ? construct : actually the manual says it's
> "unspecified". Since Tib.opent should be evaluated before everything
> else I guess, I'd say it's better to use ? let _ = Tib.opent () in let
> tport = ... ?.
Hmm - it appears to work with either construct, but as you say, it's
obviously incorrect to rely on this. I had assumed that the only reason
you have to use 'in' is when you will be using the result of a previous
calculation.
So I've also fixed this (potential) bug.
>
> But your threads problem is probably unrelated to this.
>
Using classic divide and conquer I managed to track down the thread bug
to an incorrect Field(x,y) macro earlier in the initialisation.
Thanks for all the help
Regards
Ronnie
> --
> Olivier
--
->=======================================<-
name: ronnie m chowdhury
mobile:+971-50-566-4437
tel: +971-2-681-7600
fax: +971-2-681-7900
addr: 1304, three sails towers
corniche road west
abu dhabi
po box 41876,
united arab emirates
->=======================================<-
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
prev parent reply other threads:[~2002-04-03 19:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-02 8:02 ronniec95
[not found] ` <15531.9799.220007.210452@akasha.ijm.jussieu.fr>
2002-04-03 17:20 ` ronniec95 [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=20020403172025.GA3487@cradle.net.ae \
--to=ronniec95@lineone.net \
--cc=andrieu@ijm.jussieu.fr \
--cc=caml-list@inria.fr \
/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;
as well as URLs for NNTP newsgroup(s).