Sha256: b2f7bc17a2e1b0a9318ae891b6c17d8f77811392994b751c3ba71e547b97693e

Contents?: true

Size: 432 Bytes

Versions: 27

Compression:

Stored size: 432 Bytes

Contents

# frozen_string_literal: true

require 'bundler/setup'
require 'polyphony'

Exception.__disable_sanitized_backtrace__ = true

def work
  puts "creating fibers..."
  100000.times {
    spin {
      loop { snooze }
    }
  }

  puts "done"
  suspend
end

def work_thread
  t = Thread.new { work }
  t.join
end

main = Fiber.current
p [:main, main]

# trap('SIGINT') do
#   p [:SIGINT, Fiber.current]
#   p caller
#   exit!
# end

work

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
polyphony-0.45.0 examples/core/xx-thread-snooze.rb
polyphony-0.44.0 examples/core/xx-thread-snooze.rb
polyphony-0.43.11 examples/core/xx-thread-snooze.rb
polyphony-0.43.10 examples/core/xx-thread-snooze.rb
polyphony-0.43.9 examples/core/xx-thread-snooze.rb
polyphony-0.43.8 examples/core/xx-thread-snooze.rb
polyphony-0.43.6 examples/core/xx-thread-snooze.rb
polyphony-0.43.5 examples/core/xx-thread-snooze.rb
polyphony-0.43.4 examples/core/xx-thread-snooze.rb
polyphony-0.43.3 examples/core/xx-thread-snooze.rb
polyphony-0.43.2 examples/core/xx-thread-snooze.rb
polyphony-0.43.1 examples/core/xx-thread-snooze.rb
polyphony-0.43 examples/core/xx-thread-snooze.rb
polyphony-0.42 examples/core/xx-thread-snooze.rb
polyphony-0.41 examples/core/xx-thread-snooze.rb
polyphony-0.40 examples/core/xx-thread-snooze.rb
polyphony-0.39 examples/core/xx-thread-snooze.rb
polyphony-0.38 examples/core/xx-thread-snooze.rb
polyphony-0.36 examples/core/xx-thread-snooze.rb
polyphony-0.34 examples/core/xx-thread-snooze.rb