Hi Andrew and Tridib, Okay, some more info: Ruby 1.8.7 wraps the statements in rb_w32_enter_critical() and wb_w32_leave_critical(). With 1.9.2 doing nothing special with the statements, my money is on the 1.9.2 series either no longer needing, or no longer having, these particular calls. I haven't dug into which releases in-between do and don't have these extra calls, but this might be an angle to explore if investigating the RUBY_CRITICAL macro. Garth On 31/01/12 19:38, Garthy D wrote: > > Hi Andrew and Tridib, > > On 31/01/12 13:21, andrew mcelroy wrote: >> On Mon, Jan 30, 2012 at 8:09 PM, Tridib >> Bandopadhyay<tridib04 / gmail.com>wrote: >> >>> Hello all >>> >>> Can anyone tell me about RUBY_CRITICAL(). I want to know what this >>> function is about and what it does and whats the reason of ruby calling >>> this function? >> >> it's a ruby c function. There doesn't seem to be much in the way of >> documentation. Why not pull the ruby source code and read what the >> function >> does? > > Out of interest, I just did that, and in 1.9.2 at least, it is defined > twice, with no comments, with the form: > > #define RUBY_CRITICAL(expr) do { expr; } while(0) > > And all references are in win32.c. > > Eep. :} > > I'd hazard a guess that it does absolutely nothing at all (apart from > running the supplied expression/command) in the 1.9.2 release. Perhaps > it is a relic that has since been disabled, or it is to cover code that > has not yet been written? I'm now somewhat curious about this as well. > Since one reference is in a backward compat header, I'd put my money is > on the former. > > I wonder if somebody knows? > > Garth >