Created
December 30, 2017 01:16
-
-
Save chuckremes/c180113d66a0024983473a368ba0945b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IO::Async::Private::Scheduler#new originating fiber creating io_fiber, | |
Thread.current #<Thread:0xc08 id=8 pid=3996597 source=/Users/cremes/dev/mygit/ruby-io/c/test_async_sockets.rb:9 status=run>, | |
Fiber.current #<Fiber:0xc0c thread_name=ruby.8 fiber_id=0 status=run> | |
IO::Async::Private::Scheduler#io_fiber running loop, | |
Thread.current #<Thread:0xc08 id=8 pid=3996597 source=/Users/cremes/dev/mygit/ruby-io/c/test_async_sockets.rb:9 status=run>, | |
Fiber.current #<IO::Internal::Fiber:0xc10 thread_name=ruby.8 fiber_id=9 status=transfer source=/Users/cremes/dev/mygit/ruby-io/lib/io/async/private/scheduler.rb:15>, | |
calling fiber #<Fiber:0xc0c thread_name=ruby.8 fiber_id=0 status=run> | |
IO::Async::Private::Scheduler#io_fiber_loop transferring to originating_fiber, | |
Thread.current #<Thread:0xc08 id=8 pid=3996597 source=/Users/cremes/dev/mygit/ruby-io/c/test_async_sockets.rb:9 status=run>, | |
Fiber.current #<IO::Internal::Fiber:0xc10 thread_name=ruby.8 fiber_id=9 status=transfer source=/Users/cremes/dev/mygit/ruby-io/lib/io/async/private/scheduler.rb:15>, | |
originating_fiber #<Fiber:0xc0c thread_name=ruby.8 fiber_id=0 status=run> | |
I think there's a bug in Rubinius. See above on lines 11-13. We are on thread id 8 and Fiber.current id 9 trying to transfer | |
to originating fiber id 0. Note that "originating fiber" has ruby.8 as its creating thread (that's what thread_name is for, | |
right?). My guess is that the thread "hosting" the fiber and Thread.current are getting crossed up somehow. | |
Exception in thread: attempt to transfer fiber across threads: current thread: 8, Fiber Thread: 1 (FiberError) | |
Exception: attempt to transfer fiber across threads: current thread: 8, Fiber Thread: 1 (FiberError) | |
Exception: `FiberError' /Users/cremes/dev/mygit/ruby-io/lib/io/async/private/scheduler.rb:18 - attempt to transfer fiber across threads: current thread: 8, Fiber Thread: 1 | |
call # Proc at core/proc.rb:20 | |
{ } in initialize # IO::Async::Private::Scheduler at /Users/cremes/dev/mygit/ruby-io/lib/io/async/private/scheduler.rb:18 | |
io_fiber_loop # IO::Async::Private::Scheduler at /Users/cremes/dev/mygit/ruby-io/lib/io/async/private/scheduler.rb:53 | |
attempt to transfer fiber across threads: current thread: 8, Fiber Thread: 1 (FiberError) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment