Module: SemanticLogger::RactorSupport
- Defined in:
- lib/semantic_logger/ractor_support.rb
Overview
Internal, experimental: whether this Ruby can log from Ractors other than the main one (Ruby 4.0 and later), and whether the code running now is in such a Ractor. The rest of Semantic Logger asks this module rather than checking Ractor itself.
Class Method Summary collapse
-
.enabled? ⇒ Boolean
Returns [false] since this Ruby cannot log from Ractors other than the main one.
-
.other_ractor? ⇒ Boolean
Returns [false] since every log call runs in the main Ractor.
Class Method Details
.enabled? ⇒ Boolean
Returns [false] since this Ruby cannot log from Ractors other than the main one.
8 9 10 |
# File 'lib/semantic_logger/ractor_support.rb', line 8 def self.enabled? true end |
.other_ractor? ⇒ Boolean
Returns [false] since every log call runs in the main Ractor.
13 14 15 |
# File 'lib/semantic_logger/ractor_support.rb', line 13 def self.other_ractor? !::Ractor.main? end |