From aab07466b96aaea9dd0705f52491f1ef6945479c Mon Sep 17 00:00:00 2001 From: sewardj Date: Wed, 27 Feb 2002 13:59:57 +0000 Subject: [PATCH] [project @ 2002-02-27 13:59:57 by sewardj] Add notes about OS-thread-safety in f-x-{static,dynamic}, or more precisely, the current lack thereof. --- ghc/docs/comm/the-beast/fexport.html | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ghc/docs/comm/the-beast/fexport.html b/ghc/docs/comm/the-beast/fexport.html index 531e93a..956043b 100644 --- a/ghc/docs/comm/the-beast/fexport.html +++ b/ghc/docs/comm/the-beast/fexport.html @@ -211,7 +211,15 @@ HsInt Main_d1kv ( StgStablePtr the_stableptr, In short, we can't think of a really satisfactory solution. I'd vote for introducing some kind of OS-thread-local-state and passing it in there, but that introduces complications of its own. - +

+ OS-thread-safety is of concern in the C stubs, whilst + building up the expressions to run. These need to have exclusive + access to the heap whilst allocating in it. Also, there needs to + be some guarantee that no GC will happen in between the + deRefStablePtr call and when rts_eval[IO] + starts running. At the moment there are no guarantees for + either property. This needs to be sorted out before the + implementation can be regarded as fully safe to use.

-- 1.7.10.4