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

Fsevents backport #896

Merged
merged 3 commits into from
Aug 22, 2013
Merged

Fsevents backport #896

merged 3 commits into from
Aug 22, 2013

Conversation

indutny
Copy link
Contributor

@indutny indutny commented Aug 22, 2013

Backport of recent fixes.

@bnoordhuis, sorry it seemed to be a bit complicated to backport it without your on-demand threading commit. Also, I thought that v0.10 and master will diverse even more if I'd adopt changes without your commit. So, I decided to pull it into with your changes.

Please review.

bnoordhuis and others added 3 commits August 22, 2013 16:48
* 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.

Conflicts:
	src/unix/darwin.c
Perform all operation with FSEventStream in the same thread, where it'll
be used.

Conflicts:
	src/unix/fsevents.c
It seems that number of simultaneously opened FSEventStreams is
limited on OSX (i.e. you can have only fixed number of them on
one running system), getting past through this limit will cause
`FSEventStreamCreate` to return false and write following message
to stderr:

    (CarbonCore.framework) FSEventStreamStart: register_with_server:
    ERROR: f2d_register_rpc() => (null) (-21)

To prevent this, we must use only one shared FSEventStream with a
paths for all uv_fsevent_t handles, and then filter out events for
each handle using this paths again.

See nodejs/node-v0.x-archive#5463

Conflicts:
	include/uv-private/uv-darwin.h
	src/unix/fsevents.c
@bnoordhuis
Copy link
Contributor

LGTM. Do node's simple and pummel tests pass?

@indutny
Copy link
Contributor Author

indutny commented Aug 22, 2013

Yep, they does.

@indutny indutny merged commit 684e212 into joyent:v0.10 Aug 22, 2013
@indutny
Copy link
Contributor Author

indutny commented Aug 22, 2013

Thanks, landed in 9bae606, ea4cb77 and 684e212.

@indutny indutny deleted the fsevents-backport branch August 22, 2013 14:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants