Skip to content
Snippets Groups Projects
Commit b9130dc8 authored by Florian Fischer's avatar Florian Fischer
Browse files

[Semaphore] make default constructor more explicit

The CancelFutureTest fails for libc++ because it uses two
emper::Semaphores to coordinate the involved fibers.

Using gcc and stdlibc++ the default constructor initialized the
semaphore count to 0.

The default constructor using clang and libc++ does not initialize the
semaphore count member and thus causing the CancelFutureTest to misbehave.
parent 8b22d4a5
No related merge requests found
Pipeline #86307 passed
......@@ -17,7 +17,7 @@ class Semaphore {
std::mutex mutex;
public:
Semaphore() = default;
Semaphore() : Semaphore(0){};
Semaphore(unsigned int count) : count(count){};
auto acquire() -> bool {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment