]> git.sesse.net Git - casparcg/blobdiff - shell/main.cpp
* Created custom decklink allocator for reducing memory footprint.
[casparcg] / shell / main.cpp
index 36721b83ee0809879773d68456849a0369b16f13..382e3c30797ad0c72378cc651d25877ae8e0f1cc 100644 (file)
@@ -211,7 +211,7 @@ int main(int argc, wchar_t* argv[])
        SetPriorityClass(GetCurrentProcess(), ABOVE_NORMAL_PRIORITY_CLASS);\r
 \r
        // Install structured exception handler.\r
-       caspar::win32_exception::install_handler();\r
+       caspar::win32_exception::ensure_handler_installed_for_thread("main-thread");\r
                                \r
        // Increase time precision. This will increase accuracy of function like Sleep(1) from 10 ms to 1 ms.\r
        struct inc_prec\r
@@ -226,8 +226,7 @@ int main(int argc, wchar_t* argv[])
                tbb_thread_installer(){observe(true);}\r
                void on_scheduler_entry(bool is_worker)\r
                {\r
-                       //caspar::detail::SetThreadName(GetCurrentThreadId(), "tbb-worker-thread");\r
-                       caspar::win32_exception::install_handler();\r
+                       caspar::win32_exception::ensure_handler_installed_for_thread("tbb-worker-thread");\r
                }\r
        } tbb_thread_installer;\r
 \r
@@ -274,6 +273,8 @@ int main(int argc, wchar_t* argv[])
                        // anyway when the main thread terminates.\r
                        boost::thread stdin_thread([&caspar_server, &shutdown_server_now, &wait_for_keypress]\r
                        {\r
+                               caspar::win32_exception::ensure_handler_installed_for_thread("stdin-thread");\r
+\r
                                // Create a amcp parser for console commands.\r
                                caspar::protocol::amcp::AMCPProtocolStrategy amcp(\r
                                                caspar_server.get_channels(),\r