Observer as task_scheduler_init param

Observer as task_scheduler_init param

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:

MyObserver o;
task_scheduler_init init;
init.SetObserver(&o);

Other question: can I have several observers running on the task scheduler? Can I have several task schedulers? Are they singletons?

thx

1 条帖子 / 0 全新
如需更全面地了解编译器优化,请参阅优化注意事项