Re:Fixing Threads in Ruby 1.8: A 2-10x performance boost
by scott_s on Monday May 18, 2009 @02:48PM
(#615450)
Does anyone know what Ruby 1.9 does for creating threads? Does it do something similar to what the author does, or something else entirely?
[ Parent
| on HN ]
Re:Fixing Threads in Ruby 1.8: A 2-10x performance boost
by ice799 on Monday May 18, 2009 @02:50PM
(#615453)
Hi. Author here.
Ruby 1.9 uses libpthread which creates stacks for its threads in a similar way (mmap and a guard page).
Re:Fixing Threads in Ruby 1.8: A 2-10x performance boost
by scott_s on Monday May 18, 2009 @02:55PM
(#615465)
You mean it calls pthread_create for every Ruby thread? That would mean threads are no longer green threads, since both of the widely used Pthread libraries on Linux (Linuxthreads on 2.4 versions of the kernel, and NTPL on 2.6) have a 1-to-1 mapping of POSIX threads to kernel threads.