From: Xavier Leroy <Xavier.Leroy@inria.fr>
To: Jocelyn Serot <jserot@lasmea.univ-bpclermont.fr>
Cc: caml-list@inria.fr
Subject: Re: Marshaling of custom blocks and threads
Date: Thu, 30 Nov 2000 18:44:25 +0100 [thread overview]
Message-ID: <20001130184425.B24738@pauillac.inria.fr> (raw)
In-Reply-To: <14882.23649.834222.868215@mistral.univ-bpclermont.fr>; from jserot@lasmea.univ-bpclermont.fr on Mon, Nov 27, 2000 at 02:06:41PM +0100
> Can s/o please confirm whether the module Marshal (and especially its
> usage to serialize custom blocks) is thread-safe in Ocaml 3.0 ?
> I remember reading sth about a pb with bytecode threads and marshaling
> in a previous version of Ocaml but cannot determine surely whether
> the pb has been fixed since.
With bytecode threads, there is an issue with Marshal.{to,from}_channel,
which can raise a spurious Sys_blocked_io exception. This problem is
still in 3.00, and will be corrected in the next release.
With system threads, as Gerd Stolpmann said, there used to be a race
condition bug in Marshal.to_string, but it is fixed in 3.00.
Finally, there is a bug in marshalling of custom objects in 3.00.
Manuel Fahndrich posted a fix, which is now in the working sources.
> The reason i ask follows : i have a program with (bytecode) threads
> exchanging data (float arrays) with Marshal.to_string/ThreadUnix.write and
> ThreadUnix.read/Marshal.from_string.
Shoud be OK if you apply Manuel's patch. If it still crashes, I'd be
interested in a test program that reproduces the crash.
In a previous mail, you asked:
> Just to know - before i start the work : is there any plans or work
> undergoing for integrating the support for Ocaml3.0 "custom blocks" in
> the Camlidl stub code generator ?
I'm not currently working on this, and actually don't have precise
ideas about how to provide support for custom blocks. If you have
few custom block types to handle, you can always use a typedef with
the "abstract", "c2ml" and "ml2c" attributes pointing to your own
packing/unpacking functions.
Regards,
- Xavier Leroy
next prev parent reply other threads:[~2000-12-03 22:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-11-27 13:06 Jocelyn Serot
2000-11-28 10:58 ` Ken Wakita
2000-11-29 1:22 ` Gerd Stolpmann
2000-11-29 21:37 ` Mattias Waldau
2000-11-30 17:44 ` Xavier Leroy [this message]
2000-11-29 22:34 Manuel Fahndrich
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=20001130184425.B24738@pauillac.inria.fr \
--to=xavier.leroy@inria.fr \
--cc=caml-list@inria.fr \
--cc=jserot@lasmea.univ-bpclermont.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