The event is scheduled by the activity scheduler.
Events are handled by activity objects.
Activity object
* It can be used to process asynchronous function responses.
* Derived from cactive (all activity objects are derived directly or indirectly from cactive)
* Contains
-A trequeststatus base class member variable istatus, which is used to pass in asynchronous Functions
-Runl () function, called after the request is complete
-Docancel () function, called when the request is canceled
-Priority: used to determine the call priority.
Activity Scheduler
* For a GUI program, after the program is started, the operating system will create an activity Scheduler
* The activity scheduler runs in the main thread of the application.
* You can customize the activity scheduler by yourself, but each thread can have only one activity Scheduler
* Running mode of the activity Scheduler
-Synchronization is waiting for unfinished requests to be completed
-Check the registered activity object by priority and check whether there are incomplete requests or whether the requests have been completed (istatus! = Kpequestpending)
-After the activity Object Request is complete, runl () can be called.
-Other requests can be checked only when runl () is returned.