25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
* @class OFCondition OFCondition.h ObjFW/OFCondition.h
*
* @brief A class implementing a condition variable for thread synchronization.
*/
OF_SUBCLASSING_RESTRICTED
@interface OFCondition: OFMutex
{
of_condition_t _condition;
bool _conditionInitialized;
}
/**
* @brief Creates a new condition.
*
* @return A new, autoreleased OFCondition
|
|
|
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
* @class OFCondition OFCondition.h ObjFW/OFCondition.h
*
* @brief A class implementing a condition variable for thread synchronization.
*/
OF_SUBCLASSING_RESTRICTED
@interface OFCondition: OFMutex
{
OFPlainCondition _condition;
bool _conditionInitialized;
}
/**
* @brief Creates a new condition.
*
* @return A new, autoreleased OFCondition
|
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
*
* @note Waiting might have been interrupted by a signal. It is thus recommended
* to check the condition again after @ref waitForTimeInterval: returned!
*
* @param timeInterval The time interval until the timeout is reached
* @return Whether the condition has been signaled
*/
- (bool)waitForTimeInterval: (of_time_interval_t)timeInterval;
#ifdef OF_AMIGAOS
/**
* @brief Blocks the current thread until another thread calls @ref signal,
* @ref broadcast, the timeout is reached or an Exec Signal is received.
*
* @note This is only available on AmigaOS!
*
* @param timeInterval The time interval until the timeout is reached
* @param signalMask A pointer to a signal mask of Exec Signals to receive.
* This is modified and set to the mask of signals received.
* @return Whether the condition has been signaled or a signal received
*/
- (bool)waitForTimeInterval: (of_time_interval_t)timeInterval
orExecSignal: (ULONG *)signalMask;
#endif
/**
* @brief Blocks the current thread until another thread calls @ref signal,
* @ref broadcast or the timeout is reached.
*
|
|
|
|
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
*
* @note Waiting might have been interrupted by a signal. It is thus recommended
* to check the condition again after @ref waitForTimeInterval: returned!
*
* @param timeInterval The time interval until the timeout is reached
* @return Whether the condition has been signaled
*/
- (bool)waitForTimeInterval: (OFTimeInterval)timeInterval;
#ifdef OF_AMIGAOS
/**
* @brief Blocks the current thread until another thread calls @ref signal,
* @ref broadcast, the timeout is reached or an Exec Signal is received.
*
* @note This is only available on AmigaOS!
*
* @param timeInterval The time interval until the timeout is reached
* @param signalMask A pointer to a signal mask of Exec Signals to receive.
* This is modified and set to the mask of signals received.
* @return Whether the condition has been signaled or a signal received
*/
- (bool)waitForTimeInterval: (OFTimeInterval)timeInterval
orExecSignal: (ULONG *)signalMask;
#endif
/**
* @brief Blocks the current thread until another thread calls @ref signal,
* @ref broadcast or the timeout is reached.
*
|