A question... why is not the task_scheduler_observer passed as a parameter of the task_scheduler_init?
Why not to put it in this way:
Other question: can I have several observers running on the task scheduler? Can I have several task schedulers? Are they singletons?