Module: CDC::Concurrent::ProcessorExtensions::ClassMethods

Defined in:
lib/cdc/concurrent/processor_extensions.rb

Overview

Class-level declarations added to CDC::Core::Processor.

Instance Method Summary collapse

Instance Method Details

#concurrent_safe!true

Marks the processor class as safe for cdc-concurrent execution.

This declaration means processor instances may be executed by the Async task fan-out runtime. It does not imply Ractor safety.

Returns:

  • (true)

    Always returns true after setting the declaration flag.



21
22
23
24
# File 'lib/cdc/concurrent/processor_extensions.rb', line 21

def concurrent_safe! # rubocop:disable Naming/PredicateMethod
  @concurrent_safe = true
  true
end

#concurrent_safe?Boolean

Reports whether the processor class declared concurrent_safe!.

Returns:

  • (Boolean)

    True when this processor class opted into concurrent execution.



29
30
31
# File 'lib/cdc/concurrent/processor_extensions.rb', line 29

def concurrent_safe?
  @concurrent_safe == true
end