caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "David Baelde" <david.baelde@gmail.com>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Creating wrappers for C libraries
Date: Fri, 8 Dec 2006 11:18:20 +0100	[thread overview]
Message-ID: <53c655920612080218t765e9614j5d16c3b397f6691c@mail.gmail.com> (raw)
In-Reply-To: <200612080708.35547.jon@ffconsultancy.com>

Hi,

One problem with such automated tools is that they have no clue of
which C function takes time and which returns almost instantly. And
these things matter in OCaml, as soon as you use your wrapper in
multithreaded programs: the time-consuming functions should be wrapped
around enter/leave_blocking_section() (and the ocaml data copied to
places untouched by the Gc) so that other caml threads can run while
the function is performed.

However, for libsndfile, most functions are very fast, so I guess you
can try automatic tools.

Cheers.
-- 
David


  reply	other threads:[~2006-12-08 10:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-08  4:54 Erik de Castro Lopo
2006-12-08  6:36 ` [Caml-list] " Chris King
2006-12-08  6:45 ` Sébastien Hinderer
2006-12-08  7:08 ` [Caml-list] " Jon Harrop
2006-12-08 10:18   ` David Baelde [this message]
2006-12-08 11:08     ` Sébastien Hinderer
2006-12-08 11:41 ` [Caml-list] " Richard Jones
2006-12-08 12:00   ` Daniel Bünzli

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=53c655920612080218t765e9614j5d16c3b397f6691c@mail.gmail.com \
    --to=david.baelde@gmail.com \
    --cc=caml-list@yquem.inria.fr \
    --cc=david.baelde@ens-lyon.org \
    /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).