3 ms·
Not sure why you're downvoted; you seem to be right! In Activity Monitor's Energy tab, I have to expand Terminal > login > zsh > python, but my python process i
by nyanpasu64 5y ago
Not sure why you're downvoted; you seem to be right! In Activity Monitor's Energy tab, I have to expand Terminal > login > zsh > python, but my python process is shown as App Nap: Yes.
How would I opt a program out of App Nap? Should I trust https://pypi.org/project/appnope/ https://pypi.org/project/appnope/?
- dave78 5y agoI've used AppNope with success, though I've never tested on an M1.
- jamesfmilne 5y agoThis is how you do it from Objective-C: // Call NSProcessInfo to disable AppNap et al. NSActivityOptions activityOptions = NSActivityIdleDisplaySleepDisabled | NSActivityIdleSystemSleepDisabled | NSActivityLatencyCritical; NSProcessInfo* procInfo = [NSProcessInfo processInfo]; m_NoSleepActivity = [procInfo beginActivityWithOptions:activityOptions reason:@"Running some stuff"];