bulat.ziganshin:
> Hello Donald,
> 
> Sunday, October 22, 2006, 9:04:02 AM, you wrote:
> 
> >> can't you define this call as 'safe'?
> 
> > But is it safe. Hmm.... I get kind of queasy when mucking about in the rts.
> 
> i don't understand you (because of my weak English).
> 
> 'safe' specifier is just says that function should be called in _safe_
> way that will allow to continue execute other Haskell threads. for
> functions declared as 'unsafe' GHC uses simplified call method that
> freezes execution of all Haskell threads until called function will
> return
> 
> look for details in http://www.haskell.org/~simonmar/papers/conc-ffi.pdf

Yes, I understand this. I just don't know how safe it is to have other
threads continue executing while I'm swapping code in and out of the
system...
  
> >     foreign import ccall unsafe "lookupSymbol"
> >        c_lookupSymbol :: CString -> IO (Ptr a)

This could be safe, then, for other threads to continue. Yes.

-- Don
_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to