Skip to content
This repository has been archived by the owner on May 4, 2018. It is now read-only.

darwin: lazy init fsevents thread #872

Closed
bnoordhuis opened this issue Aug 8, 2013 · 1 comment
Closed

darwin: lazy init fsevents thread #872

bnoordhuis opened this issue Aug 8, 2013 · 1 comment
Labels

Comments

@bnoordhuis
Copy link
Contributor

The CF thread that drives FSEvents should be started lazily, i.e. when the first FSEvents handle is created.

Limiting its stack size would be good, too. I'm not sure how much address space XNU reserves for a new thread but if it's more than a few pages, it's more than the thread needs.

/cc @indutny

bnoordhuis added a commit that referenced this issue Aug 13, 2013
* Move CF run loop code to fsevents.c.

* Create the fsevents thread on demand rather than at startup.

* Remove use of ACCESS_ONCE. All accesses to loop->cf_loop are
  protected by full memory barriers so no reordering can take place.

Fixes #872.
@bnoordhuis
Copy link
Contributor Author

Fixed in 06c4fa6 and c82e703.

/cc @brson

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant