• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

guard / rb-inotify / 83
80%

Build:
DEFAULT BRANCH: master
Ran 26 Sep 2020 11:58PM UTC
Jobs 1
Files 7
Run time 1s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
83

push

travis-ci

ioquatix
Prevent race condition in Notifier#run / #stop

There is a potential race condition when a notifier is run in a new
thread and then immediately stopped in the original thread.  If
`Notifier#stop` sets `@stop = true` before `Notifier#run` sets
`@stop = false`, then `Notifier#run` will loop until `Notifier#stop` is
called again.  Furthermore, if `Notifier#run` acquires the `@running`
mutex before `Notifier#stop` does (but after `Notifier#stop` sets
`@stop = true`), then `Notifier#stop` will get stuck waiting for the
mutex while `Notifier#run` infinitely loops.

This commit modifies `Notifier#run` to assume `@stop == false` when it
begins, and to reset `@stop = false` only after its loop terminates,
thus eliminating the race.

2 of 2 new or added lines in 1 file covered. (100.0%)

172 of 214 relevant lines covered (80.37%)

9.26 hits per line

Jobs
ID Job ID Ran Files Coverage
1 83.1 (2.3) 26 Sep 2020 11:58PM UTC 0
80.37
Travis Job 83.1
Source Files on build 83
  • Tree
  • List 7
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Travis Build #83
  • 010f1406 on github
  • Prev Build on master (#82)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc