MeVisLab Toolbox Reference
Semaphore.h
Go to the documentation of this file.
1// Copyright (c) Fraunhofer MEVIS, Germany. All rights reserved.
2// **InsertLicense** code
3
4#pragma once
5
6#include <asio/System.h>
7
8#include <FMEThirdPartyWarningsDisable.h>
9#include <cstddef>
10#include <mutex>
11#include <condition_variable>
12#include <FMEThirdPartyWarningsRestore.h>
13
14
15namespace asio {
16
40 {
41 public:
42
44
46
47 void increment();
48
49 void decrement();
50
51 private:
52
53 std::size_t count;
54 std::mutex mutex;
55 std::condition_variable is_zero;
56 };
57
58
85
86}
#define ASYNCHRONOUSIO_EXPORT
Definition System.h:10
A scoped semaphore access object that increments on construction and decrements on destruction.
Definition Semaphore.h:72
ScopedSemaphoreAccess(const ScopedSemaphoreAccess &other)
ScopedSemaphoreAccess(Semaphore &semaphore)
A simple semaphore with increment and decrement functionality.
Definition Semaphore.h:40
Target mlrange_cast(Source arg)
Generic version of checked ML casts.