Skip to content

fiber_loop raise stack too deep error #14

@zealot2007

Description

@zealot2007

I use fiber_loop to run many session to collect bandwidth data periodically. but i always encounter stack too deep exception from dispatcher.rb:99
def fiber_loop(options = {})
timeout = options[:timeout]
sleep_time = options[:sleep] || 0.2
Fiber.new {
loop do
num_handled = poll(timeout)
if num_handled == 0
f = Fiber.current
EM.add_timer(sleep_time) do
f.resume #-> raise exception .line 99
end
Fiber.yield
end
end
}.resume(nil)
end

em_loop method also has this issue. but it can works longer than fiber_loop

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions