コード例 #1
0
ファイル: scoped_thread.hpp プロジェクト: ktj007/mmo
    /**
     * Destructor
     * Effects: Call the CallableThread functor before destroying the owned thread.
     * Remark: The CallableThread should not throw when joining the thread as the scoped variable is on a scope outside the thread function.
     */
    ~strict_scoped_thread()
    {
      CallableThread on_destructor;

      on_destructor(t_);
    }
コード例 #2
0
ファイル: thread_guard.hpp プロジェクト: imos/icfpc2015
    ~thread_guard()
    {
      CallableThread on_destructor;

      on_destructor(t_);
    }