Class: Chimp::IDManager
- Inherits:
-
Object
- Object
- Chimp::IDManager
- Defined in:
- lib/right_chimp/id_manager.rb
Constant Summary collapse
- @@id =
0
- @@mutex =
Mutex.new
Class Method Summary collapse
Class Method Details
.get ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/right_chimp/id_manager.rb', line 9 def self.get r = nil @@mutex.synchronize do @@id = @@id + 1 r = @@id end return r end |