problem with count_waiters in Ruby 1.9.3

There is "count_waiters" which was implemented in ruby 1.8 in file
"test_completion_signalling_helper.rb" and not in Ruby 1.9.3

I am stuck because of this. Please help me to get some work-around or is
it implemented in some other form?

The code in which i am using this count_waiters is :

def self.signal_waiting_test(test_name, proxy_call=false)
      signal_data = SIP::Locator[:Tlocks][test_name] if
SIP::Locator[:Tlocks]
      unless signal_data
          return false
      end
      signal_data.lock.synchronize do
        signal_data.lock << "signal"
        if signal_data.cond.count_waiters > 0
           signal_data.cond.signal
        else
          SipLogger['siplog::sip_testcompletionsignalinghelper'].debug
"Queueing the signal"
        end
      end
    end

But "count_waiters" is not implemented as such in Ruby 1.9.3