Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HaLVM and threads

I don't quite understand what eg HaLVM or similar technologies do in terms of (OS) threads.

I understand that when compiling code with the option -threaded then the Haskell multithreaded RTS will use OS threads to re-allocate existing Haskell threads and thus avoid blocking behaviour of foreign calls. Now, when you use the HaLVM you probably don't have to make any foreign calls. However, I wonder how this all blends, and how many worker threads the HaLVM does run. Are there no other situations where the absence of OS worker threads may lead to blocking or otherwise undesired behavior?

like image 685
J Fritsch Avatar asked Jan 15 '13 15:01

J Fritsch


1 Answers

The HaLVM uses the single-threaded GHC runtime.

Porting HaLVM to use the threaded runtime, with support from multicore Xen would be an interesting project.

like image 74
Don Stewart Avatar answered Oct 14 '22 06:10

Don Stewart