From: Sylvain Le Gall <sylvain@le-gall.net>
To: caml-list@inria.fr
Subject: Re: ocamlnet and kernel poll
Date: Thu, 11 Sep 2008 15:50:43 +0000 (UTC) [thread overview]
Message-ID: <slrngcifij.g94.sylvain@gallu.homelinux.org> (raw)
In-Reply-To: <43AB5EFE-44FF-47AB-818E-F27DD03823AE@gmail.com>
On 11-09-2008, Joel Reymont <joelr1@gmail.com> wrote:
>
> On Sep 11, 2008, at 4:32 PM, Markus Mottl wrote:
>
>> Use bigstrings as buffers and
>> perform I/O outside of the OCaml-lock if releasing it (depends on
>> I/O-size) is more efficient.
>
> Are you suggesting using multiple OS threads within a single process?
>
> When exactly do you release the lock and how do you perform IO outside
> of it?
>
> How do you determine whether to release the lock or not?
>
I tink Markus is talking about the lock of the OCaml GC. When you do a
potentially long syscall (like select, read...) the GC lock is released
letting other OCaml thread running.
Look at enter_blocking_section()/leave_blocking_section() in C part of
OCaml source.
You will still have 1 OCaml thread running but many other thread in C
call can also be running.
In particular, it means that OCaml thread can be used for standard
"non-blocking" syscall replacement.
Regards,
Sylvain Le Gall
next prev parent reply other threads:[~2008-09-11 15:50 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-11 12:43 Joel Reymont
2008-09-11 12:51 ` Sylvain Le Gall
2008-09-11 13:42 ` [Caml-list] " Gerd Stolpmann
2008-09-11 14:04 ` Markus Mottl
2008-09-11 14:37 ` Mattias Engdegård
2008-09-11 15:32 ` Markus Mottl
2008-09-11 15:43 ` Joel Reymont
2008-09-11 15:50 ` Sylvain Le Gall [this message]
2008-09-11 16:31 ` Markus Mottl
2008-09-24 15:05 ` Rich Neswold
2008-09-24 15:43 ` Gabriel Kerneis
2008-09-26 15:53 ` Rich Neswold
2008-09-24 17:28 ` Markus Mottl
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=slrngcifij.g94.sylvain@gallu.homelinux.org \
--to=sylvain@le-gall.net \
--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).