Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

80 - Resuming a fiber in update or draw results in an exception on Windows #79

Closed
jlnr opened this Issue · 1 comment

1 participant

@jlnr
Owner


The code below fails with an unhandled exception, as soon as @fiber.resume is called.

require 'gosu'

class GameWindow < Gosu::Window
def initialize(fiber)
super(640, 480, false)
@fiber = fiber
end

def update
@fiber.resume
end

def draw
end
end

fiber = Fiber.new do
loop do
puts 'fiber resumed'
Fiber.yield
end
end
fiber.resume
fiber.resume
window = GameWindow.new(fiber)
window.show

My configuration:

Windows 7 [Version 6.1.7600]
ruby 1.9.2p0 (2010-08-18) [i386-mingw32]
gosu (0.7.24 i386-mingw32)

Also tried on an XP machine with the same outcome.

Perhaps, EventMachine has a similar issue?
http://redmine.ruby-lang.org/issues/show/3523


Original link: http://code.google.com/p/gosu/issues/detail?id=80

@jlnr
Owner

Closing this, as I don't feel that Fibers have ever really caught on.

@jlnr jlnr closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.