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

Disable libuv worker thread on mac #8407

Closed
brson opened this issue Aug 8, 2013 · 2 comments
Closed

Disable libuv worker thread on mac #8407

brson opened this issue Aug 8, 2013 · 2 comments
Labels
A-runtime Area: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows

Comments

@brson
Copy link
Contributor

brson commented Aug 8, 2013

On mac, every libuv event loop creates another thread in order to do something tty-related. This is really expensive for us, so we need to find a way to not do it.

Some IRC logs:

16:01 < brson> on mac (at least) the event loop creates another worker thread. what is it for? does it exist on all platforms?
16:01 <@tjfontaine> brson: that's used for some of the tty checking code, iirc
16:02 <@tjfontaine> brson: afaik it's a mac specific work around
16:02 < brson> tjfontaine: thanks. do you know if it can be disabled?
16:04 <@tjfontaine> brson: looking at it, it doesn't seem so, https://github.com/joyent/libuv/blob/master/src/unix/tty.c#L40-L44 which calls 
                    https://github.com/joyent/libuv/blob/master/src/unix/stream.c#L284-L371
@brson
Copy link
Contributor Author

brson commented Aug 8, 2013

16:43 < bnoordhuis> brson: oh, that's probably fedor's fsevents thread
16:46 < bnoordhuis> brson: yes, it's used to drive the CFRunLoop that in turn powers fsevents
16:47 < bnoordhuis> kind of lame that it gets created unconditionally, i wonder why i didn't notice that during review...
16:47 -!- c4milo [~c4milo@207-38-136-210.c3-0.avec-ubr2.nyr-avec.ny.cable.rcn.com] has joined #libuv
16:48 < brson> lazy initialization of that thread would be sweet :)
16:49 < bnoordhuis> yeah. i'll file an issue
16:50 <@isaacs> bnoordhuis: so... yeah.  we should probably leave it as-is.
16:51 < bnoordhuis> isaacs: 'leave as-is' meaning?
16:52 <@isaacs> bnoordhuis: keep as utf8

@brson
Copy link
Contributor Author

brson commented Aug 18, 2013

This is fixed upstream - the thread is initialized lazily.

flip1995 pushed a commit to flip1995/rust that referenced this issue Feb 24, 2022
Don't lint `needless_borrow` in method receiver positions

fixes rust-lang#8408
fixes rust-lang#8407
fixes rust-lang#8391
fixes rust-lang#8367
fixes rust-lang#8380

This is a temporary fix for `needless_borrow`. The proper fix is included in rust-lang#8355.

This should probably be merged into rustc before beta branches on Friday. This issue has been reported six or seven times in the past couple of weeks.

changelog: Fix various issues with `needless_borrow` n´. Note to changelog writer: those issues might have been introduced in this release cycle, so this might not matter in the changelog.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-runtime Area: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows
Projects
None yet
Development

No branches or pull requests

1 participant