search for: ruby_crit

Displaying 1 result from an estimated 1 matches for "ruby_crit".

2007 Oct 21
2
Simulating RUBY_CRITICAL
Hi all, I''ve added some critical section methods to the Windows::Synchronize module in the windows-pr library (in CVS). Looking at the RUBY_CRITICAL macro from rubysig.h, it basically looks like this (in pure Ruby): def RUBY_CRITICAL(&block) critical_section = [0].pack(''L'') InitializeCriticalSection(critical_section) EnterCriticalSection(critical_section) block.call LeaveCriticalSection(critical_s...