Skip to content

Commit

Permalink
issue guard#513: omit early return and @wait_thread&.alive? since bot…
Browse files Browse the repository at this point in the history
…h are unnecessary race conditions
  • Loading branch information
ColinDKelley committed Nov 13, 2020
1 parent 5f13dca commit c811801
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/listen/event/loop.rb
Expand Up @@ -64,12 +64,9 @@ def pause
end

def stop
return if stopped?
transition! :stopped

if @wait_thread&.alive?
@wait_thread.join
end
@wait_thread&.join
@wait_thread = nil
end

Expand Down

0 comments on commit c811801

Please sign in to comment.