From e199c200be63a0efcc8ac8fc63d69d96c5fc65bf Mon Sep 17 00:00:00 2001 From: simonpj Date: Tue, 18 Jun 2002 15:13:32 +0000 Subject: [PATCH] [project @ 2002-06-18 15:13:32 by simonpj] clarification in multi-threading docs --- ghc/docs/comm/rts-libs/multi-thread.html | 42 ++++++++++++++++++++++-------- 1 file changed, 31 insertions(+), 11 deletions(-) diff --git a/ghc/docs/comm/rts-libs/multi-thread.html b/ghc/docs/comm/rts-libs/multi-thread.html index d31a1d6..67a544b 100644 --- a/ghc/docs/comm/rts-libs/multi-thread.html +++ b/ghc/docs/comm/rts-libs/multi-thread.html @@ -28,7 +28,7 @@ OS threads may safely call Haskell functions concurrently. Section -

Calling out

+

The problem: foreign calls that block

When a Concurrent Haskell(CH) thread calls a 'foreign import'ed function, the runtime system(RTS) has to handle this in a manner @@ -48,25 +48,45 @@ threads (pthreads) and one for the Win32 threads.

Multi-threading the RTS

-From an RTS perspective, a simple and efficient way to implement this -is to retain the property that only one OS thread is allowed to +A simple and efficient way to implement non-blocking foreign calls is like this: +

+

+The rest of this section describes the mechanics of implementing all +this. There's two parts to it, one that describes how a native (OS) thread leaves the RTS to service the external call, the other how the same thread handles returning the result of the external call back to the Haskell thread. -- 1.7.10.4