Link Copied
[cpp]class Win32HandlerInstaller : public tbb::task_scheduler_observer { public: Win32HandlerInstaller() { observe(true); } void on_scheduler_entry( bool is_worker ) { Win32Exception::InstallHandler(); CASPAR_LOG_INFO() << "Started TBB Worker Thread"; } void on_scheduler_exit( bool is_worker ) { CASPAR_LOG_INFO() << "Ended TBB Worker Thread"; } }; int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int) { Win32HandlerInstaller(); tbb::task_scheduler_init tbb_init; Application app; return app.Run(); // Doesnt return until applicaiton ends }[/cpp]
For more complete information about compiler optimizations, see our Optimization Notice.