From: Xavier Leroy <xavier.leroy@inria.fr>
To: Richard Jones <rich@annexia.org>
Cc: Mikkel Fahn?e J?rgensen <mikkel@dvide.com>, caml-list@inria.fr
Subject: Re: [Caml-list] Re: mod_ocaml 0.6.0 feedback
Date: Thu, 21 Aug 2003 16:50:01 +0200 [thread overview]
Message-ID: <20030821165001.B14140@pauillac.inria.fr> (raw)
In-Reply-To: <20030819131556.GB5227@redhat.com>; from rich@annexia.org on Tue, Aug 19, 2003 at 02:15:56PM +0100
> The reason for not supporting Apache 2 is simply that I don't know
> much about how to port Apache 1.x code to Apache 2. Also I'm a bit
> worried about threading issues. (I've CC'd this to the caml-list -
> can anyone comment?)
I'm assuming Apache 2.0 is multithreaded, so that the Caml functions
could possibly end up being called by several (POSIX) threads
simultaneously. The following should work:
- Put a mutex around calls to the "callback*" functions
(those that call back into Caml from C), so that Caml execution
is entirely serialized.
- Do *not* use Caml threads in your Caml code, and do not link the
Caml code with the Caml threading libraries. Currently,
Caml threads and callbacks don't work together. I'll have to
address this at some point in the future.
> Unfortunately Dynlink doesn't provide a way to unload modules (can
> anyone on caml-list comment?).
This is correct, but there are no easy ways to do that. Unloading
*safely* a piece of dynamically-linked code would require scanning the
whole heap, making sure that no live function value refers to that
piece of code. The alternative would be to let the GC find out the
dead pieces of code, but again this is problematic since code blocks
are not garbage-collected in the current implementation.
- Xavier Leroy
-------------------
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
next prev parent reply other threads:[~2003-08-21 14:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <004d01c3664c$0e33a880$738c0a0a@spss.com>
2003-08-19 13:15 ` Richard Jones
2003-08-19 14:39 ` Alexander V. Voinov
2003-08-21 14:50 ` Xavier Leroy [this message]
2003-08-21 15:52 ` Richard Jones
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=20030821165001.B14140@pauillac.inria.fr \
--to=xavier.leroy@inria.fr \
--cc=caml-list@inria.fr \
--cc=mikkel@dvide.com \
--cc=rich@annexia.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