RE: [Haskell-cafe] Unbound threads and FFI

Did you read the paper Extending the Haskell Foreign Function Interface with Concurrency, described in the GHC Wiki page about concurrency? It'd be a good start http://hackage.haskell.org/trac/ghc/wiki/GhcConcurrency Please do improve it. Simon | -----Original Message----- | From: haskell-cafe-bounces@haskell.org [mailto:haskell-cafe-bounces@haskell.org] On Behalf Of Joel | Reymont | Sent: 14 December 2005 14:37 | To: Haskell-Cafe Cafe | Subject: [Haskell-cafe] Unbound threads and FFI | | How do unbound threads play with FFI? According to Simon PJ, each | foreign call will get its own OS thread if its blocked. | | How does GHC determine if the call is blocked? Does each call get its | own OS thread from the start? Sometime later? Does this depend on the | safe/unsafe specs of the foreign call? | | Does the above change if a threaded/non-threaded runtime is in use? | | Thanks, Joel | | -- | http://wagerlabs.com/ | | | | | | _______________________________________________ | Haskell-Cafe mailing list | Haskell-Cafe@haskell.org | http://www.haskell.org/mailman/listinfo/haskell-cafe

Simon, I could not find the paper at the link below but it can be found here: http://www.haskell.org/~simonmar/papers/conc-ffi.pdf The paper does not explain the differences I'm seeing between runs of my program linked with the threaded and non-threaded runtimes. I get crashes with the threaded runtime (sent to both you and Simon) and things run slowly. With the non-threaded runtime everything flies. All my FFI calls are marked unsafe and thus should be blocking in both runtimes so I cannot explain the differences. Thanks, Joel On Dec 15, 2005, at 9:07 AM, Simon Peyton-Jones wrote:
Did you read the paper Extending the Haskell Foreign Function Interface with Concurrency, described in the GHC Wiki page about concurrency? It'd be a good start http://hackage.haskell.org/trac/ghc/wiki/GhcConcurrency
participants (2)
-
Joel Reymont
-
Simon Peyton-Jones