Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
petiaccja committed Feb 20, 2024
1 parent 657b82d commit d240d0b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions include/asyncpp/container/atomic_deque.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include "../threading/spinlock.hpp"

#include <mutex>
#include <utility>


namespace asyncpp {
Expand Down
1 change: 1 addition & 0 deletions include/asyncpp/container/atomic_stack.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include "../threading/spinlock.hpp"

#include <mutex>
#include <utility>


namespace asyncpp {
Expand Down
4 changes: 2 additions & 2 deletions include/asyncpp/testing/interleaver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ class thread {

template <class Func, class... Args>
thread(Func func, Args&&... args) {
const auto wrapper = [ this, func = std::move(func) ]<Args... args>(Args && ... args_) {
const auto wrapper = [this, func = std::move(func)]<class... Args_>(std::stop_token, Args_&&... args_) {
initialize_this_thread();
INTERLEAVED("initial_point");
func(std::forward<Args>(args_)...);
func(std::forward<Args_>(args_)...);
m_content->state.store(thread_state::completed);
};
m_content->thread = std::jthread(wrapper, std::forward<Args>(args)...);
Expand Down
2 changes: 1 addition & 1 deletion src/thread_pool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ void thread_pool::execute(worker& local,
return INTERLEAVED_ACQUIRE(terminate.test());
});
}
} while (!INTERLEAVED(local.worklist.empty()) || !INTERLEAVED(global_worklist.empty())|| !INTERLEAVED(terminate.test()));
} while (!INTERLEAVED(local.worklist.empty()) || !INTERLEAVED(global_worklist.empty()) || !INTERLEAVED(terminate.test()));
}


Expand Down

0 comments on commit d240d0b

Please sign in to comment.