fix a deadlock

the deadlock occurs between internal_scope_guard and the mutex of
handle_manager
This commit is contained in:
Jinhao 2017-01-27 01:50:09 +08:00
parent 6c3ba75f6f
commit 3f5d2fa0c5

View File

@ -1,7 +1,7 @@
/* /*
* Window Manager Implementation * Window Manager Implementation
* Nana C++ Library(http://www.nanapro.org) * Nana C++ Library(http://www.nanapro.org)
* Copyright(C) 2003-2016 Jinhao(cnjinhao@hotmail.com) * Copyright(C) 2003-2017 Jinhao(cnjinhao@hotmail.com)
* *
* Distributed under the Boost Software License, Version 1.0. * Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at * (See accompanying file LICENSE_1_0.txt or copy at
@ -1386,6 +1386,7 @@ namespace detail
void window_manager::remove_trash_handle(unsigned tid) void window_manager::remove_trash_handle(unsigned tid)
{ {
internal_scope_guard lock;
impl_->wd_register.delete_trash(tid); impl_->wd_register.delete_trash(tid);
} }