Hacker News new | ask | show | jobs
by WorldMaker 3569 days ago
There is a Suspending callback.

Sounds like you have some misconceptions about the UWP/WinRT application lifecycle:

https://msdn.microsoft.com/en-us/windows/uwp/launch-resume/a...

1 comments

If I recall correctly, this callback has some undocumented deadline. Go over that and it's unceremoniously killed, great way to corrupt whatever you're desperately trying to write to disk.
No, it is a pretty well documented deadline at this point. The callback is not intended for I/O work, but to clean up resources or to spin up any background tasks you might need for I/O. There are lots of articles full of best practices for the app lifecycle. Yes, it's different than Win32. Yes, it's influenced by mobile and low resource environments. But it's better for it and worth learning.