|
|
|
@ -135,7 +135,7 @@ void func() {
|
|
|
|
|
std::this_thread::sleep_for(std::chrono::seconds(2));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#include "sync_queue.h"
|
|
|
|
|
#include "base/sync_queue.h"
|
|
|
|
|
void sync_test(){
|
|
|
|
|
// 同步队列
|
|
|
|
|
auto queue = new SyncQueue<int>(3);
|
|
|
|
@ -165,7 +165,7 @@ void sync_test(){
|
|
|
|
|
|
|
|
|
|
#include <chrono>
|
|
|
|
|
#include <iomanip>
|
|
|
|
|
#include "stop_watch.h"
|
|
|
|
|
#include "util/stop_watch.h"
|
|
|
|
|
|
|
|
|
|
void chrono_test(){
|
|
|
|
|
|
|
|
|
@ -197,7 +197,7 @@ void chrono_test(){
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#include "thread_pool.h"
|
|
|
|
|
#include "base/thread_pool.h"
|
|
|
|
|
void thread_test(){
|
|
|
|
|
ThreadPool pool(3,10);
|
|
|
|
|
|
|
|
|
|