From: Grigory Petrov Date: 2012-02-14T22:11:30+09:00 Subject: Why GIL is not released on ruby/dl external function call. Hello. if i run following test code: require 'dl/import' module User32 extend DL::Importer dlload 'user32' extern 'int MessageBoxA(int, char*, char*, int)' end Thread.new { User32.MessageBoxA( 0, "Text", "Caption", 0 ) } loop { sleep 1; puts( "loop running" ) } I will see no "loop running" messages while message box is visible. So i can suggest that Ruby is not releasing GIL while calling external function via Ruby\dl. Why such weird architectural decision? This prevents me from calling blocking functions in background thread :(.