Skip to content

Commit

Permalink
Raise an exception if the scheduler was already closed.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Oct 1, 2020
1 parent 1366010 commit 7f29020
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/fiber/scheduler.rb
Expand Up @@ -101,6 +101,8 @@ def run
end

def close
raise "Scheduler already closed!" if @closed

self.run
ensure
@closed = true
Expand Down

0 comments on commit 7f29020

Please sign in to comment.