Method: ParticlePool::PoolThread#push
- Defined in:
- lib/particle_pool/pool_thread.rb
#push(t, *args, **kwargs) ⇒ Object
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/particle_pool/pool_thread.rb', line 16 def push(t, *args, **kwargs) @mtx.synchronize do @tasks += 1 @queue << { task: t, args: args, kwargs: kwargs } end end |