Skip to content

Commit

Permalink
small perf fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kelbon committed Aug 8, 2024
1 parent 9d26aa9 commit 60805e8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/kelcoro/operation_hash.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ struct KELCORO_CO_AWAIT_REQUIRED op_hash_t {

} // namespace noexport

// precondition: opeation can be executed
// precondition: operation can be executed
// e.g. it is not empty coroutine handle or empty std::function
template <typename T>
struct operation_hash {
Expand Down
2 changes: 1 addition & 1 deletion include/kelcoro/thread_pool.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ struct thread_pool {

// specialization for thread pool uses hash to maximize parallel execution
inline void attach_list(thread_pool& e, task_node* top) {
operation_hash_t hash = 0;
operation_hash_t hash = noexport::do_hash(top);
while (top) {
task_node* next = top->next;
e.select_worker(hash).attach(top);
Expand Down

0 comments on commit 60805e8

Please sign in to comment.