commit | e54668110ece4c6113a4e880f6ce5c21636978e5 | [log] [tgz] |
---|---|---|
author | Zhenkai Zhu <zhenkai@cs.ucla.edu> | Thu Jan 17 18:28:32 2013 -0800 |
committer | Zhenkai Zhu <zhenkai@cs.ucla.edu> | Thu Jan 17 18:28:32 2013 -0800 |
tree | 33094fe12cdf42d13bacc72ce1c863899ebeacb5 | |
parent | 34edd4d57b243f5dcf6be3178be331a1e4c59788 [diff] [blame] |
scheduler shutdown
diff --git a/scheduler/scheduler.cc b/scheduler/scheduler.cc index 225e484..e7630d2 100644 --- a/scheduler/scheduler.cc +++ b/scheduler/scheduler.cc
@@ -82,13 +82,13 @@ void Scheduler::shutdown() { + WriteLock lock(m_mutex); + if (m_running) { - WriteLock lock(m_mutex); + event_base_loopbreak(m_base); + m_thread.join(); m_running = false; } - - event_base_loopbreak(m_base); - m_thread.join(); } bool