Module: AsyncFutures

Defined in:
lib/async_futures.rb,
lib/async_futures/error.rb,
lib/async_futures/future.rb,
lib/async_futures/logger.rb,
lib/async_futures/counter.rb,
lib/async_futures/version.rb,
lib/async_futures/executor.rb,
lib/async_futures/io_async.rb,
lib/async_futures/fiber_executor.rb,
lib/async_futures/ractor_executor.rb,
lib/async_futures/thread_executor.rb,
lib/async_futures/process_executor.rb,
lib/async_futures/synchronized_delegator.rb,
sig/async_futures.rbs

Overview

:nocov:

Defined Under Namespace

Modules: IOAsync, IOSync Classes: CancelledError, Counter, DeadlockError, Error, Executor, FiberExecutor, Future, InvalidStateError, NoConcurrencyError, ProcessExecutor, RactorError, RactorExecutor, SynchronizedDelegator, ThreadExecutor

Constant Summary collapse

VERSION =

Version of the library as a String instance.

Returns:

  • (String)
'0.2.0'

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.logger ⇒ Object

Configurable logger for the library. All calls assume the standard logger interface.

Defaults to being unset (i.e. nil).



10
11
12
# File 'lib/async_futures/logger.rb', line 10

def logger
  @logger
end

Class Method Details

.worker_name ⇒ Object

Get the name for the current worker.



18
19
20
# File 'lib/async_futures/executor.rb', line 18

def worker_name
  Fiber[:async_futures_worker_name]
end

.worker_name=(name) ⇒ Object

Set the name for the current worker.



13
14
15
# File 'lib/async_futures/executor.rb', line 13

def worker_name=(name)
  Fiber[:async_futures_worker_name] = name.to_s
end