Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00014 #include <iostream>
00015 #include "thread-pool-ondemand.h"
00016
00017 using namespace std;
00018
00019 thread_pool_ondemand *thread_pool_ondemand::m_instance = NULL;
00020
00021 thread_pool_ondemand *thread_pool_ondemand::get_instance() {
00022 if (m_instance == NULL) {
00023 m_instance = new thread_pool_ondemand();
00024 }
00025 return m_instance;
00026 }
00027
00028 void thread_pool_ondemand::delete_instance() {
00029 L_COUT << "// TEST-IGNORE: Delete thread pool instance" << endl;
00030 delete m_instance;
00031 m_instance = NULL;
00032 }
00033
00034 thread_pool_ondemand::thread_pool_ondemand() {
00035 assert(m_instance == NULL);
00036 }
00037
00038 thread_pool_ondemand::~thread_pool_ondemand() {
00039 terminate_simulation();
00040 }