mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-07 15:31:18 +12:00
Add all the files
This commit is contained in:
parent
e3db07a16a
commit
d60742f52b
1445 changed files with 430238 additions and 0 deletions
0
src/util/ThreadPool/ThreadPool.cpp
Normal file
0
src/util/ThreadPool/ThreadPool.cpp
Normal file
15
src/util/ThreadPool/ThreadPool.h
Normal file
15
src/util/ThreadPool/ThreadPool.h
Normal file
|
@ -0,0 +1,15 @@
|
|||
#include <thread>
|
||||
|
||||
class ThreadPool
|
||||
{
|
||||
public:
|
||||
template<class TFunction, class... TArgs>
|
||||
static void FireAndForget(TFunction&& f, TArgs&&... args)
|
||||
{
|
||||
// todo - find a way to use std::async here so we can utilize thread pooling?
|
||||
std::thread t(std::forward<TFunction>(f), std::forward<TArgs>(args)...);
|
||||
t.detach();
|
||||
}
|
||||
|
||||
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue