You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A bit of a necropost, but you can use the objc2-foundation v0.2.2 crate and the activity API:
use objc2_foundation::{NSProcessInfo,NSActivityOptions,NSString};// Disable app-naplet activity = NSProcessInfo::processInfo().beginActivityWithOptions_reason(NSActivityOptions::NSActivityUserInitiatedAllowingIdleSystemSleep,&NSString::from_str("No napping on the job!"),);// Keep the `activity` around while having app-nap disabled// Re-enable app-napNSProcessInfo::processInfo().endActivity(&activity);
Web has implemented afew ways to manage throttling.
I also plan to expose a way to prevent screen dimming or system sleep (see #3351).
I think that this area, after all these are a lot of different things, is in scope for Winit, considering that it is related to managing the event loop.
I don't know about other backends, but Web has something similar to app nap: most browsers start freezing apps when not focused or not in use, so I will be adding an API that prevents that. Maybe this could be a cross-platform API?
Currently I have a problem about the process not executed for serval seconds in 'app nap' mode,
more information about 'app nap' is there
and there is the problem: https://stackoverflow.com/questions/61810703/a-very-strange-problem-that-winit-block-the-output-from-other-threads
Is there currently a way to abandon the app nap mode?
The text was updated successfully, but these errors were encountered: