Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/listen/adapter/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def stop
private

def _stop
@run_thread.kill.join if @run_thread
@run_thread&.kill
@run_thread = nil
end

Expand Down
2 changes: 1 addition & 1 deletion lib/listen/adapter/darwin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def _process_event(dir, path)
end

def _stop
@worker_thread.kill.join if @worker_thread
@worker_thread&.kill
super
end
end
Expand Down
3 changes: 2 additions & 1 deletion spec/lib/listen/adapter/polling_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,9 @@
expect(snapshot).to receive(:invalidate).
with(:dir, '.', { recursive: true })

subject.start
t = Thread.new { subject.start }
sleep 0.25
t.kill
end
end

Expand Down
Loading