Re: Threads in GHC's RTS

1999-04-17 Thread Manuel M. T. Chakravarty
Michael Hobbs <[EMAIL PROTECTED]> wrote, > "Manuel M. T. Chakravarty" wrote: > > > Following the reverse naming scheme of the FFI paper: > > > > unsafe - the RTS makes no special provisions and just > >calls the C function (this means the function > >

Re: Threads in GHC's RTS

1999-04-16 Thread Michael Hobbs
"Manuel M. T. Chakravarty" wrote: > > Michael Hobbs <[EMAIL PROTECTED]> wrote, > > > I don't think that these three FFI types are enough to cover *all* of > > the bases regarding callbacks, blocking, and thread-safety. > > My point here is that, in the RTS, "unsafe", "safe", and > "threadsafe"

Re: Threads in GHC's RTS

1999-04-15 Thread Manuel M. T. Chakravarty
Michael Hobbs <[EMAIL PROTECTED]> wrote, > "Manuel M. T. Chakravarty" wrote: > > Therefore, I propose to have three kinds of FFI calls: > > > > unsafe- as before > > safe - as currently implemented > > supersafe - (or call it "threadsafe" or "blocksafe") > > the solu

Re: Threads in GHC's RTS

1999-04-14 Thread Michael Hobbs
We'll see if I can finally get this message to post to the list... "Manuel M. T. Chakravarty" wrote: > Therefore, I propose to have three kinds of FFI calls: > > unsafe- as before > safe - as currently implemented > supersafe - (or call it "threadsafe" or "blocksafe") >

RE: Threads in GHC's RTS

1999-04-12 Thread Manuel M. T. Chakravarty
[Third attempt (I'll get it right at some point!), to post this to the list; I am sorry if it results in any duplication of the post.] Simon Peyton-Jones <[EMAIL PROTECTED]> wrote, > > Let's summarize the questions: > > > > * Will safe FFI calls eventually be executed by extra OS > > threads

RE: Threads in GHC's RTS

1999-04-12 Thread Manuel M. T. Chakravarty
PS: My previous post didn't address: SimonM wrote, > Maybe indeed. Bear in mind the deadlock problem described above too - you > might need supersafe C-calls even if the C-call can't block, to avoid > Haskell deadlocks. Still, I think, we should find a FFI that can also be used by a Haskell i

RE: Threads in GHC's RTS

1999-04-09 Thread Simon Marlow
> "Manuel M. T. Chakravarty" wrote: > > [...] > >The specification says in Section 4.6 (about "safe" and "unsafe" > > C calls) that in case of a "safe" call, a new OS thread is > > spawned to execute the called C > > As I understand, it's fine to run them in new OS thread , because safe > functio

Re: Threads in GHC's RTS

1999-04-09 Thread Herbert Graeber
"Manuel M. T. Chakravarty" wrote: > [...] >The specification says in Section 4.6 (about "safe" and "unsafe" > C calls) that in case of a "safe" call, a new OS thread is > spawned to execute the called C As I understand, it's fine to run them in new OS thread , because safe functions should be pur

RE: Threads in GHC's RTS

1999-04-09 Thread Simon Marlow
> Michael Hobbs <[EMAIL PROTECTED]> and I were just discussing > the use of GHC's threads (ie, the `Concurrent' library) > within GTK+ applications when we came across an > inconsistency between ``The STG runtime system (revised)'' > and the actual implementation of the RTS in GHC 4.02. The > sp