FFI: number of worker threads?

Simon Peyton-Jones simonpj at microsoft.com
Wed Jun 21 03:34:06 EDT 2006


New worker threads are spawned on as needed.  You'll need as many of
them as you have simultaneously-blocked foreign calls. If you have 2000
simultaneously-blocked foreign calls, you'll need 2000 OS threads to
support them, which probably won't work.

If you think you have only a handful of simultaneously-blocked foreign
calls, but you still get "runaway worker threads", please do make a
reproducible test case and file a bug report.

Simon M will probably reply to Seth's qns about thread IDs (I assume you
mean Haskell thread ID?) in due course.


Once you get answers, can I ask either or both of you to type in what
you learned to the GHC user-documentation Wiki?  That way things
improve!   The place to start is here
	http://haskell.org/haskellwiki/GHC
under "Collaborative documentation".  There's a already a page for
"Concurrency" and for "FFI", so you can add to those.  Thanks

Simon

| -----Original Message-----
| From: glasgow-haskell-users-bounces at haskell.org
[mailto:glasgow-haskell-users-bounces at haskell.org]
| On Behalf Of Bulat Ziganshin
| Sent: 21 June 2006 07:00
| To: Seth Kurtzberg
| Cc: glasgow-haskell-users at haskell.org
| Subject: Re[2]: FFI: number of worker threads?
| 
| Hello Seth,
| 
| Wednesday, June 21, 2006, 7:18:48 AM, you wrote:
| 
| 
| Seth and Li, look at
http://www.cse.unsw.edu.au/~chak/haskell/ghc/comm/rts-libs/multi-thread.
html
| 
| it may answer some of your questions
| 
| (page http://www.cse.unsw.edu.au/~chak/haskell/ghc/comm/ contains
| commentaries about GHC internals)
| 
| 
| > I have a related question.  The docs state that in some
| 
| >> The paper "Extending the Haskell FFI with Concurrency" mentioned
the
| 
| 
| --
| Best regards,
|  Bulat                            mailto:Bulat.Ziganshin at gmail.com
| 
| _______________________________________________
| Glasgow-haskell-users mailing list
| Glasgow-haskell-users at haskell.org
| http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


More information about the Glasgow-haskell-users mailing list