Re: native threads vs. -threaded

2010-03-15 Thread Simon Marlow
On 13/03/2010 22:54, Donn Cave wrote: Quoth Simon Marlowmarlo...@gmail.com, ... So it was surprising when this turned out to be incompatible with the -threaded link option. With that option, I get one callback from a non-main thread, and then that native thread will die, shortly after return

Re: native threads vs. -threaded

2010-03-15 Thread Donn Cave
Quoth Simon Marlow marlo...@gmail.com, ... Does the wrapper rts_lock() account for everything, or do threads need some initial setup I need to account for? Nope, as long as the RTS is initialised properly via hs_init() you should be able to make callbacks from any OS thread. Thanks - I'm

Re: native threads vs. -threaded

2010-03-13 Thread Simon Marlow
On 12/03/10 16:38, Donn Cave wrote: I have been working on a Haskell interface to the platform API for Haiku (was BeOS.) It's C++, but the interesting thing at the moment is the use of threads - a UI window gets its own thread, and whatever Haskell code will be executed by callbacks from that

Re: native threads vs. -threaded

2010-03-13 Thread Donn Cave
Quoth Simon Marlow marlo...@gmail.com, ... So it was surprising when this turned out to be incompatible with the -threaded link option. With that option, I get one callback from a non-main thread, and then that native thread will die, shortly after return from the callback. You'll need to

native threads vs. -threaded

2010-03-12 Thread Donn Cave
I have been working on a Haskell interface to the platform API for Haiku (was BeOS.) It's C++, but the interesting thing at the moment is the use of threads - a UI window gets its own thread, and whatever Haskell code will be executed by callbacks from that thread. So it was surprising when this