tahoma2d/toonz/sources/stdfx/igs_resource_multithread.h

28 lines
571 B
C
Raw Normal View History

2016-05-17 03:04:11 +12:00
#pragma once
2016-03-19 06:57:51 +13:00
#ifndef igs_resource_multithread_h
#define igs_resource_multithread_h
#include <vector>
2016-06-15 18:43:10 +12:00
namespace igs {
namespace resource {
class thread_execute_interface {
2016-03-19 06:57:51 +13:00
public:
2016-06-15 18:43:10 +12:00
virtual void run(void) = 0;
virtual ~thread_execute_interface() {} /* 仮想デストラクタの空定義 */
2016-03-19 06:57:51 +13:00
};
2016-06-15 18:43:10 +12:00
class multithread {
2016-03-19 06:57:51 +13:00
public:
2016-06-15 18:43:10 +12:00
void add(void *thread_execute_instance);
void run(void); /* 指定が一個の場合はスレッド実行せずただ実行 */
void clear(void);
2016-03-19 06:57:51 +13:00
private:
2016-06-15 18:43:10 +12:00
std::vector<void *> thre_exec_;
2016-03-19 06:57:51 +13:00
};
}
}
#endif /* !igs_resource_multithread_h */