class NestedScheduler::ThreadPool
 
  - NestedScheduler::ThreadPool
- Reference
- Object
Defined in:
nested_scheduler/thread_pool.crConstant Summary
- 
        WORKER_NAME = "Worker Loop"
Constructors
Class Method Summary
Instance Method Summary
- 
        #cancel
        
          TODO Investigate cancellation contexts, a la https://vorpus.org/blog/timeouts-and-cancellation-for-humans/ 
- 
        #canceled?
        
          Has the pool been canceled? 
- #done?
- #done_channel : Channel(Nil)
- #done_channel=(done_channel : Channel(Nil))
- #fibers : NestedScheduler::LinkedList2(Fiber)
- #fibers=(fibers : NestedScheduler::LinkedList2(Fiber))
- #finishing?
- 
        #inspect
        
          Returns an unambiguous and information-rich string representation of this object, typically intended for developers. 
- #io_context : NestedScheduler::IOContext
- #io_context=(io_context : NestedScheduler::IOContext)
- #name : String | Nil
- #name=(name : String | Nil)
- #next_thread!
- #register_fiber(fiber)
- #result_handler : NestedScheduler::Result
- #result_handler=(result_handler : NestedScheduler::Result)
- #spawn(*, name : String | Nil = nil, same_thread = false, &block : -> _) : Fiber
- #spawned : Atomic(Int32)
- #spawned=(spawned : Atomic(Int32))
- #state
- #unregister_fiber(fiber)
- #wait_until_done
- #workers : Array(Thread)
- #workers=(workers : Array(Thread))
Macro Summary
- 
        collect(t, **options)
        
          Collects the return values of the fiber blocks, in unspecified order. 
Constructor Detail
Class Method Detail
Instance Method Detail
TODO Investigate cancellation contexts, a la https://vorpus.org/blog/timeouts-and-cancellation-for-humans/
Returns an unambiguous and information-rich string representation of this object, typically intended for developers.
This method should usually not be overridden. It delegates to
#inspect(IO) which can be overridden for custom implementations.
Also see #to_s.
Macro Detail
Collects the return values of the fiber blocks, in unspecified order. If an exception happen, it is propagated.