Skip to content

Commit

Permalink
Merge pull request #22 from mjopenglsdl/b_fix_compiling
Browse files Browse the repository at this point in the history
make example compile
  • Loading branch information
mtrebi authored Oct 13, 2020
2 parents feb91d6 + f5b3d01 commit dac6bdd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ include_directories (

set(HEADERS include/SafeQueue.h include/ThreadPool.h)

set(SOURCES src/main.cpp)
set(SOURCES example/main.cpp)

SET(CMAKE_CXX_FLAGS -pthread)

Expand Down
5 changes: 4 additions & 1 deletion example/example.cpp → example/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ int multiply_return(const int a, const int b) {
}


void example() {
int main(int argc, char *argv[])
{
// Create pool with 3 threads
ThreadPool pool(3);

Expand Down Expand Up @@ -66,4 +67,6 @@ void example() {
std::cout << "Last operation result is equals to " << res << std::endl;

pool.shutdown();

return 0;
}

0 comments on commit dac6bdd

Please sign in to comment.