caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "David McClain" <barabh@qwest.net>
To: <caml-list@inria.fr>
Subject: [Caml-list] SysThreads and Win/NT DLL's
Date: Fri, 30 Nov 2001 02:30:47 -0700	[thread overview]
Message-ID: <000701c17981$b1560030$210148bf@dylan> (raw)

Well, I see now that it takes more than just one Lazy.force on the proposed
lazy init clause. In fact, any of the Thread routines that can accept a
non-Thread.t argument potentially needs the same Lazy.force inserted.

...but still, this isn't too bad...

Alas, any program statements that call upon these Thread routines at the top
level, e.g., non-closures with Thread calls for value, need to be delayed as
well, so that the DLL can successfully start up without spawning new
threads -- a no, no, in DllMain.

Of course the other possibility is to avoid calling caml_startup()
altogether from inside of DllMain, and instead handle deferred
initialization in other DLL entry points. That avoids the problem entirely,
but forces less automatic behavior on the user of the DLL.

- D.McClain, Sr. Scientist, Raytheon Systems Co., Tucson, AZ
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


                 reply	other threads:[~2001-11-30  9:49 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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='000701c17981$b1560030$210148bf@dylan' \
    --to=barabh@qwest.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).