New answers tagged

0

First, the operating system has complete control of the computer. If it wants the app to do something it will do it. The general mechanism specific to MacOS and iOS you are asking about is the Notification Center. Each application has an instance of the Notification Center. Your application registers code that it wants to be executed when some notification ...


1

The operating system should not just start running the code in the process. That's been tried before (UNIX signals) and it didn't work very well - it's very difficult to handle signals without bugs. Generically: The operating system provides some kind of "wait for something to happen" syscall. The application then has a main loop that looks like: ...


Top 50 recent answers are included