c++11 条件变量 notify_one,notify_all,wait_for,wait_until,队列c++实现,makefile

C++条件变量中的notify_one()和notify_all()区别

c++11 并发编程 --- 条件变量(condition_variable) wait,wait_for

条件变量wait_until超时等待

队列c++实现

std::unique_lock,std::lock_guard,std::vector<std::thread>

linux makefile

#makefie example

objects=test.o TermSecInfo.o MsgQueue.o

test:$(objects)
    g++ -o $@ $^ -lpthread

%.o:%.cpp
    g++ -c $^ -o $@

clean:
    rm test $(objects)
 
喜欢 0
分享