feat: alternate syntax for threads
This commit is contained in:
parent
61db6ed694
commit
aa57bab764
6 changed files with 70 additions and 7 deletions
|
|
@ -14,7 +14,11 @@ namespace fishbone {
|
|||
Impl* impl;
|
||||
|
||||
public:
|
||||
Thread(void (*call)(fishbone::Thread* thread, void* arg), void* arg);
|
||||
using Callable = void(*)(fishbone::Thread* thread, void* arg);
|
||||
using CallableFunc = std::function<void(fishbone::Thread* thread)>;
|
||||
|
||||
Thread(Callable call, void* arg);
|
||||
Thread(CallableFunc call);
|
||||
~Thread();
|
||||
|
||||
void join();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue