Skip to content

cpp-main/work-thread

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

[中文]

WorkThread

License Language

The worker thread class receives delegated tasks in an independent thread.

It is a very useful module extracted from the cpp-tbox project, which can be used independently after excluding functions related to other modules of cpp-tbox.
The source code corresponding to cpp-tboxwork_thread.hwork_thread.cpp

How to integrate it into your project?

Copy work_thread.cpp and work_thread.h under src/ to your project, and compile them together with normal code.

How to use?

#include "work_thread.h"
...
hevake::WorkThread worker;
...
worker.execute([]{ DoSomethingByWorker(); });
...

See Demo

Recommend

This module is just a little part of cpp-tbox。 There are many more useful modules out there.
Click here to go to: cpp-tbox

Encourage us

We would be happy if you could give us a star.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published