Sha256: 38cfd69ed385a13cff96e2840735ac0275ea67854752191c19066e0599c0b61b

Contents?: true

Size: 330 Bytes

Versions: 16

Compression:

Stored size: 330 Bytes

Contents

require 'thread'

module Fiveruns::Dash
  
  module Threads
    
    def self.included(base)
      base.extend ClassMethods
    end
    
    module ClassMethods
      
      def monitor
        @monitor ||= Monitor.new
      end
      
      def sync(&block)
        monitor.synchronize(&block)
      end
    end
    
  end
  
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
fiveruns-dash-ruby-0.7.0 lib/fiveruns/dash/threads.rb
fiveruns-dash-ruby-0.7.1 lib/fiveruns/dash/threads.rb
fiveruns-dash-ruby-0.7.2 lib/fiveruns/dash/threads.rb
fiveruns-dash-ruby-0.7.3 lib/fiveruns/dash/threads.rb
fiveruns-dash-ruby-0.7.4 lib/fiveruns/dash/threads.rb
fiveruns-dash-ruby-0.7.5 lib/fiveruns/dash/threads.rb
fiveruns-dash-ruby-0.7.6 lib/fiveruns/dash/threads.rb
fiveruns-dash-ruby-0.8.0 lib/fiveruns/dash/threads.rb
fiveruns-dash-ruby-0.8.1 lib/fiveruns/dash/threads.rb
fiveruns-dash-ruby-0.8.10 lib/fiveruns/dash/threads.rb
fiveruns-dash-ruby-0.8.3 lib/fiveruns/dash/threads.rb
fiveruns-dash-ruby-0.8.4 lib/fiveruns/dash/threads.rb
fiveruns-dash-ruby-0.8.5 lib/fiveruns/dash/threads.rb
fiveruns-dash-ruby-0.8.6 lib/fiveruns/dash/threads.rb
fiveruns-dash-ruby-0.8.8 lib/fiveruns/dash/threads.rb
fiveruns-dash-ruby-0.8.9 lib/fiveruns/dash/threads.rb