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

chore: use kqueue backend of notify on macOS #21028

Merged
merged 7 commits into from
Oct 31, 2023

Conversation

littledivy
Copy link
Member

@littledivy littledivy commented Oct 31, 2023

Fixes #20996

"macos_fsevent" feature of notify links us to CoreFoundation on macOS.

Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a difference in performance?

@littledivy
Copy link
Member Author

Hard to tell until all of the PRs land. This one needs review: #18072

@littledivy littledivy enabled auto-merge (squash) October 31, 2023 11:56
@@ -32,7 +32,7 @@ async function getTwoEvents(
const events = [];
for await (const event of iter) {
events.push(event);
if (events.length > 2) break;
if (events.length >= 2) break;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: leave a comment here describing why it might be > 2 in some cases.

Copy link
Contributor

@mmastrac mmastrac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM one nit

@littledivy littledivy merged commit 646afdf into denoland:main Oct 31, 2023
13 checks passed
@littledivy littledivy deleted the kqueue_notify branch October 31, 2023 16:43
littledivy added a commit that referenced this pull request Nov 1, 2023
littledivy added a commit that referenced this pull request Nov 1, 2023
Reverts #21028

Reason:
https://github.com/notify-rs/notify/blob/main/notify/src/kqueue.rs#L79-L81
Need to wait for the watcher thread to spawn otherwise we hit flakes

---------

Signed-off-by: Divy Srivastava <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Zero macOS framework dependencies
3 participants