Skip to content

Commit

Permalink
fix incorrect class name
Browse files Browse the repository at this point in the history
  • Loading branch information
Fdhvdu committed Mar 31, 2019
1 parent b16f02d commit c773025
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,17 +89,17 @@ The directory should be look like
├── README.md
├── src
└── tutorial
Don't forget to compile lib/src/CScopeGuard.cpp.
Don't forget to compile lib/src/Scope_guard.cpp.
# Compilation errors?
See [How to compile](https://github.com/Fdhvdu/ThreadPool/blob/master/README.md#how-to-compile) or email me
# Tutorial
I provide [example.cpp](tutorial/example.cpp) and [example_ret.cpp](tutorial/example_ret.cpp) to help you understand how to use this powerful thread pool<br>
To use [example.cpp](tutorial/example.cpp):<br>

g++ -std=c++17 tutorial/example.cpp src/* ../lib/src/CScopeGuard.cpp
g++ -std=c++17 tutorial/example.cpp src/* ../lib/src/Scope_guard.cpp
To use [example_ret.cpp](tutorial/example_ret.cpp):<br>

g++ -std=c++17 tutorial/example_ret.cpp src/IThreadPoolItemBase.cpp ../lib/src/CScopeGuard.cpp
g++ -std=c++17 tutorial/example_ret.cpp src/IThreadPoolItemBase.cpp ../lib/src/Scope_guard.cpp
# Future work
add a non-block version of `CThreadPool::add`<br>
work stealing
4 changes: 2 additions & 2 deletions header/CThreadPoolItem_Ret.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include<utility> //forward
#include"../../lib/header/thread/CTask.hpp"
#include"../../lib/header/thread/CWait_bounded_queue.hpp"
#include"../../lib/header/tool/CScopeGuard.hpp"
#include"../../lib/header/tool/Scope_guard.hpp"
#include"IThreadPoolItemBase.hpp"

namespace nThread
Expand All @@ -27,7 +27,7 @@ namespace nThread
}
inline Ret get()
{
const nTool::CScopeGuard sg{[this]{waiting_queue_.emplace_and_notify(this);}};
const nTool::Scope_guard sg{[this]{waiting_queue_.emplace_and_notify(this);}};
return exec_.get();
}
bool is_running() const noexcept override
Expand Down

0 comments on commit c773025

Please sign in to comment.