Sha256: 300560321eb632ccba39eade7710b0617c6f4d57b2f3e26fa03cec672a17399a
Contents?: true
Size: 402 Bytes
Versions: 2
Compression:
Stored size: 402 Bytes
Contents
# frozen_string_literal: true require 'dry/effects/provider' module Dry module Effects module Providers class Fork < Provider[:fork] attr_reader :stack def fork stack = self.stack.dup -> &cont { Frame.spawn_fiber(stack.dup, &cont) } end def call(stack) @stack = stack super end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
dry-effects-0.1.1 | lib/dry/effects/providers/fork.rb |
dry-effects-0.1.0 | lib/dry/effects/providers/fork.rb |