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
> >
"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"
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
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")
>
[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
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
> "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
"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
> 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