FC Updates from BitShares and myself #21
1 changed files with 5 additions and 2 deletions
|
|
@ -77,6 +77,7 @@ namespace fc {
|
||||||
try {
|
try {
|
||||||
set_thread_name(name.c_str()); // set thread's name for the debugger to display
|
set_thread_name(name.c_str()); // set thread's name for the debugger to display
|
||||||
this->my = new thread_d( *this, notifier );
|
this->my = new thread_d( *this, notifier );
|
||||||
|
cleanup();
|
||||||
current_thread() = this;
|
current_thread() = this;
|
||||||
p->set_value();
|
p->set_value();
|
||||||
exec();
|
exec();
|
||||||
|
|
@ -126,8 +127,10 @@ namespace fc {
|
||||||
}
|
}
|
||||||
|
|
||||||
void thread::cleanup() {
|
void thread::cleanup() {
|
||||||
delete current_thread();
|
if ( current_thread() ) {
|
||||||
current_thread() = nullptr;
|
delete current_thread();
|
||||||
|
current_thread() = nullptr;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const string& thread::name()const
|
const string& thread::name()const
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue