• 2024-11-11【多线程】---1115. 交替打印 FooBar
     解法1:condition_variable + mutex classFooBar{private:intn;mutexmtx;condition_variablecv;boolfoo_done=false;public:FooBar(intn){this->n=n;}voidfoo(function<void()>printFoo)