add BT_SetTerminate to all threads
This commit is contained in:
@@ -674,6 +674,7 @@ void App::dialog_timelapse_export()
|
|||||||
void App::dialog_export_mp4()
|
void App::dialog_export_mp4()
|
||||||
{
|
{
|
||||||
std::thread([this] {
|
std::thread([this] {
|
||||||
|
BT_SetTerminate();
|
||||||
const int video_width = 1024;
|
const int video_width = 1024;
|
||||||
const int video_height = 512;
|
const int video_height = 512;
|
||||||
const int video_frames = 500;
|
const int video_frames = 500;
|
||||||
|
|||||||
@@ -1897,6 +1897,7 @@ void Canvas::export_depth(std::string file_name, std::function<void()> on_comple
|
|||||||
if (App::I->check_license())
|
if (App::I->check_license())
|
||||||
{
|
{
|
||||||
std::thread t([=] {
|
std::thread t([=] {
|
||||||
|
BT_SetTerminate();
|
||||||
export_depth_thread(file_name);
|
export_depth_thread(file_name);
|
||||||
if (on_complete)
|
if (on_complete)
|
||||||
on_complete();
|
on_complete();
|
||||||
|
|||||||
@@ -780,6 +780,7 @@ LRESULT CALLBACK splash_proc(HWND hWndDlg, UINT Msg, WPARAM wParam, LPARAM lPara
|
|||||||
HWND splash_dialog;
|
HWND splash_dialog;
|
||||||
void splash_thread_loop()
|
void splash_thread_loop()
|
||||||
{
|
{
|
||||||
|
BT_SetTerminate();
|
||||||
splash_dialog = CreateDialog(hInst, MAKEINTRESOURCE(IDD_SPLASH), NULL, reinterpret_cast<DLGPROC>(splash_proc));
|
splash_dialog = CreateDialog(hInst, MAKEINTRESOURCE(IDD_SPLASH), NULL, reinterpret_cast<DLGPROC>(splash_proc));
|
||||||
|
|
||||||
MSG msg;
|
MSG msg;
|
||||||
|
|||||||
@@ -841,6 +841,8 @@ bool NodePanelBrushPreset::export_ppbr(const std::string& path_in, const PPBRInf
|
|||||||
|
|
||||||
bool NodePanelBrushPreset::import_ppbr(const std::string& path)
|
bool NodePanelBrushPreset::import_ppbr(const std::string& path)
|
||||||
{
|
{
|
||||||
|
BT_SetTerminate();
|
||||||
|
|
||||||
Asset f;
|
Asset f;
|
||||||
if (f.open(path.c_str()))
|
if (f.open(path.c_str()))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -126,6 +126,7 @@ void NodePanelGrid::init_controls()
|
|||||||
if (ShaderManager::ext_float32 || ShaderManager::ext_float16)
|
if (ShaderManager::ext_float32 || ShaderManager::ext_float16)
|
||||||
{
|
{
|
||||||
std::thread([this] {
|
std::thread([this] {
|
||||||
|
BT_SetTerminate();
|
||||||
bake_uvs();
|
bake_uvs();
|
||||||
m_hm_shading->set_index(3);
|
m_hm_shading->set_index(3);
|
||||||
m_shade_mode = ShadeMode::Textured;
|
m_shade_mode = ShadeMode::Textured;
|
||||||
|
|||||||
@@ -706,6 +706,7 @@ void parallel_for(size_t nb_elements, std::function<void(size_t i)> functor, boo
|
|||||||
{
|
{
|
||||||
size_t start = i * batch_size;
|
size_t start = i * batch_size;
|
||||||
my_threads[i] = std::thread([functor, start, batch_size]() {
|
my_threads[i] = std::thread([functor, start, batch_size]() {
|
||||||
|
BT_SetTerminate();
|
||||||
for (size_t j = start; j < start + batch_size; j++)
|
for (size_t j = start; j < start + batch_size; j++)
|
||||||
functor(j);
|
functor(j);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user