Disable App Nap on OSX 10.9+ #5041
pull fanquake wants to merge 1 commits into bitcoin:master from fanquake:disable_app_nap changing 1 files +3 −0-
fanquake commented at 11:38 am on October 4, 2014: member
-
Disable App Nap on OSX 10.9+ 1f9be984db
-
theuni commented at 8:31 pm on October 6, 2014: memberutACK.
-
theuni commented at 9:23 pm on October 6, 2014: member
@fanquake I looked around a bit for APIs we should be using, rather than disabling the functionality completely. I assumed that there would be some calls we could make before/after initiating some network activity (not that it would be useful for us, probably, given the nature of p2p), but I was disappointed in the documentation.
Basically, I would like to know how a network-heavy application should work with AppNap without disabling it, if only for my own edification. Have you stumbled onto anything along those lines?
-
fanquake commented at 0:41 am on October 7, 2014: member
@theuni It looks the like we’d be using methods out of the NSProcessInfo Class.
0beginActivityWithOptions:reason: 1endActivity: 2performActivityWithOptions:reason:usingBlock:
They allow you to temporarily suspend idle sleep, display sleep, sudden termination, and automatic termination for the duration of a particular operation as well as allow an app to temporarily increase the scheduler timer precision while it is performing latency-critical operations.
Then we’d pick the right option flags for what we’d like to do, something like
0NSActivityIdleSystemSleepDisabled 1NSActivitySuddenTerminationDisabled 2NSActivityLatencyCritical
-
laanwj merged this on Oct 7, 2014
-
laanwj closed this on Oct 7, 2014
-
laanwj referenced this in commit 2b5261c636 on Oct 7, 2014
-
fanquake deleted the branch on May 12, 2016
-
kittywhiskers referenced this in commit 937dc5ede1 on Jul 15, 2021
-
kittywhiskers referenced this in commit 8d500d78fa on Jul 15, 2021
-
DrahtBot locked this on Sep 8, 2021
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-18 21:12 UTC
More mirrored repositories can be found on mirror.b10c.me