When --enable-pthread is given, Ruby 1.8 will currently use getcontext() and setcontext() for implementing context switching if available. However, this results in some serious performance problems because of excessive sigprocmask calls, as explained by Joe Damato and Aman Gupta: http://timetobleed.com/fix-a-bug-in-rubys-configurein-and-get-a-30-performance-boost/ They've published a patch which adds the '--disable-ucontext' configure option. When this option is given in combination with --enable-pthread, Ruby will use _longjmp()/_setjmp() instead of getcontext()/setcontext(). _longjmp()/_setjmp() do not try to save and restore the signal masks. This improves performance significantly. I'm working on a patch which automatically detects whether _longjmp()/_setjmp() should be used instead of getcontext()/setcontext(). Are there any reasons why getcontext()/setcontext() should be used over _longjmp()/_setjmp()?