Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change CFRunLoopIsWaiting to return cf::Boolean #319

Merged
merged 2 commits into from
May 15, 2021
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,19 @@
- FIX: Report events promptly on Linux, even when many occur in rapid succession. [#268]
- FIX: Remove `anymap`, and replace event attributes with an opaque type. [#306]
- CHANGE: Hide fsevent::{CFRunLoopIsWaiting,callback}, fix clippy lint warnings [#312]
- FIX: Correct the return type for `CFRunLoopIsWaiting` to be `Boolean` [#314]

[#268]: https://github.com/notify-rs/notify/pull/268
[#306]: https://github.com/notify-rs/notify/pull/306
[#312]: https://github.com/notify-rs/notify/pull/312
[#314]: https://github.com/notify-rs/notify/pull/314

## unreleased

- FIX: Correct the return type for `CFRunLoopIsWaiting` to be `Boolean` [#314]
- CHANGE: Hide fsevent::{CFRunLoopIsWaiting,callback}, fix clippy lint warnings [#312]

[#314]: https://github.com/notify-rs/notify/pull/314
[#312]: https://github.com/notify-rs/notify/pull/312

## 5.0.0-pre.8 (2021-05-12)
Expand Down
4 changes: 2 additions & 2 deletions src/fsevent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ struct StreamContextInfo {

extern "C" {
/// Indicates whether the run loop is waiting for an event.
fn CFRunLoopIsWaiting(runloop: cf::CFRunLoopRef) -> bool;
fn CFRunLoopIsWaiting(runloop: cf::CFRunLoopRef) -> cf::Boolean;
}

impl FsEventWatcher {
Expand Down Expand Up @@ -250,7 +250,7 @@ impl FsEventWatcher {
unsafe {
let runloop = runloop as *mut raw::c_void;

while !CFRunLoopIsWaiting(runloop) {
while CFRunLoopIsWaiting(runloop) == 0 {
thread::yield_now();
}

Expand Down