4
* Copyright 2010 Eric Day
6
* Licensed under the Apache License, Version 2.0 (the "License");
7
* you may not use this file except in compliance with the License.
8
* You may obtain a copy of the License at
10
* http://www.apache.org/licenses/LICENSE-2.0
12
* Unless required by applicable law or agreed to in writing, software
13
* distributed under the License is distributed on an "AS IS" BASIS,
14
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
* See the License for the specific language governing permissions and
16
* limitations under the License.
21
* @brief Notification Declarations
24
#ifndef SCALESTACK_COMMON_NOTIFICATION_H
25
#define SCALESTACK_COMMON_NOTIFICATION_H
27
#include <scalestack/common/macros.h>
35
* This class provides a way for different threads to notify each other. This
36
* uses a pipe rather than conditional thread mechanisms to be more portable.
38
class SCALESTACK_API notification
47
* Send a notification.
52
* Wait for a notification.
59
* Don't allow copying of objects.
61
notification(const notification&);
64
* Don't allow assignment of objects.
66
notification& operator=(const notification&);
69
* Format an error message from errno and throw an exception.
71
* @param[in] prefix The prefix for the error message.
73
void _throw_exception(const char* prefix);
78
} /* namespace common */
79
} /* namespace scalestack */
81
#endif /* SCALESTACK_COMMON_NOTIFICATION_H */