Class: Farce::Strict::Lazy
- Inherits:
-
Abstract::Lazy
- Object
- Abstract::Lazy
- Farce::Strict::Lazy
- Includes:
- Farce::Shareable::Tracked
- Defined in:
- lib/farce/strict/lazy.rb
Overview
A shareable lazy value that retains its shareable result directly. The factory runs once, even when threads or Ractors access it concurrently. A failed factory or an unshareable result can be retried on the next access.
Instance Method Summary collapse
-
#freeze ⇒ self
Resolve and freeze the slot without freezing the result.
Methods included from Farce::Shareable
#initialize, #ractor_shareable?
Methods inherited from Abstract::Lazy
Methods included from Abstract::Value
Methods included from Internal::Copyable
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Farce::Abstract::Lazy
Instance Method Details
#freeze ⇒ self
Resolve and freeze the slot without freezing the result.
19 20 21 22 23 |
# File 'lib/farce/strict/lazy.rb', line 19 def freeze value internal_atom.freeze super end |