Class: RMXSynchronizedStrongToWeakHash
- Inherits:
-
RMXStrongToWeakHash
- Object
- Hash
- RMXStrongToWeakHash
- RMXSynchronizedStrongToWeakHash
- Defined in:
- lib/motion/RMXSynchronizedStrongToWeakHash.rb
Instance Method Summary collapse
- #[](key) ⇒ Object
- #[]=(key, value) ⇒ Object
- #delete(key) ⇒ Object
-
#initialize ⇒ RMXSynchronizedStrongToWeakHash
constructor
A new instance of RMXSynchronizedStrongToWeakHash.
- #values ⇒ Object
Methods inherited from RMXStrongToWeakHash
Constructor Details
#initialize ⇒ RMXSynchronizedStrongToWeakHash
Returns a new instance of RMXSynchronizedStrongToWeakHash.
3 4 5 6 |
# File 'lib/motion/RMXSynchronizedStrongToWeakHash.rb', line 3 def initialize super @queue = Dispatch::Queue.new("#{NSBundle.mainBundle.bundleIdentifier}.rmx.IdentityMap.queue.#{object_id}") end |
Instance Method Details
#[](key) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/motion/RMXSynchronizedStrongToWeakHash.rb', line 8 def [](key) res = nil @queue.sync do res = super end res end |
#[]=(key, value) ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/motion/RMXSynchronizedStrongToWeakHash.rb', line 16 def []=(key, value) res = nil @queue.sync do res = super end res end |
#delete(key) ⇒ Object
24 25 26 27 28 29 30 |
# File 'lib/motion/RMXSynchronizedStrongToWeakHash.rb', line 24 def delete(key) res = nil @queue.sync do res = super end res end |
#values ⇒ Object
32 33 34 35 36 37 38 |
# File 'lib/motion/RMXSynchronizedStrongToWeakHash.rb', line 32 def values res = nil @queue.sync do res = super end res end |