Module: RactorShack::ShareableGuaranteed::InstanceOverrides
- Defined in:
- lib/ractor_shack/shareable_guaranteed.rb
Instance Method Summary collapse
- #<<(message, move: false) ⇒ Object
-
#send(message, move: false) ⇒ Object
TODO: DRY these two up! See if alias gets the job done.
Instance Method Details
#<<(message, move: false) ⇒ Object
83 84 85 86 87 88 89 90 91 |
# File 'lib/ractor_shack/shareable_guaranteed.rb', line 83 def <<(, move: false) unless move || Ractor.shareable?() if ShareableGuaranteed.consider_shareable.none? { |klass| .is_a?(klass) } ::Kernel.raise NonShareableSentToRactorError.new(self, ) end end super end |
#send(message, move: false) ⇒ Object
TODO: DRY these two up! See if alias gets the job done.
73 74 75 76 77 78 79 80 81 |
# File 'lib/ractor_shack/shareable_guaranteed.rb', line 73 def send(, move: false) unless move || Ractor.shareable?() if ShareableGuaranteed.consider_shareable.none? { |klass| .is_a?(klass) } ::Kernel.raise NonShareableSentToRactorError.new(self, ) end end super end |