Skip to content

Commit

Permalink
Sem: forbid cp, mv & assign
Browse files Browse the repository at this point in the history
  • Loading branch information
fchn289 committed Oct 24, 2023
1 parent 2282a60 commit f3eee42
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/thread/MT_Semaphore.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,13 @@ class MT_Semaphore
template<typename Rep = int, typename Period = ratio<1, 1000> >
MT_Semaphore(const duration<Rep, Period>& aTimeout = 10ms);
~MT_Semaphore();
MT_Semaphore(const MT_Semaphore&) = delete;
MT_Semaphore& operator=(const MT_Semaphore&) = delete;

void mt_wait() { sem_wait(&mt_sem_); }
void mt_notify();

auto mt_notifyAtEnd(auto&& aFn)
auto mt_notifyAtEnd(auto&& aFn) // grammer asks in hpp only
{
return [aFn, this](auto&&... aArgs)
{
Expand Down

0 comments on commit f3eee42

Please sign in to comment.