|
Objectively 1.0.0
Ultra-lightweight object oriented framework for GNU C.
|
#include <Condition.h>
POSIX Threads conditional variables.
Conditions combine a Lock with a signaling mechanism, so that Threads may inform one another when a condition is met.
Definition at line 44 of file Condition.h.
Properties | |
| Lock | lock |
| The superclass. More... | |
Properties inherited from Lock | |
| Object | object |
| The superclass. More... | |
Properties inherited from Object | |
| Class * | clazz |
| Every instance of Object begins with a pointer to its Class. More... | |
Methods | |
| Class * | _Condition (void) |
| The Condition archetype. More... | |
| void | broadcast (Condition *self) |
| Signals all Threads waiting on this Condition. More... | |
| Condition * | init (Condition *self) |
| Initializes this Condition. More... | |
| void | signal (Condition *self) |
| Signals a single Thread waiting on this Condition. More... | |
| void | wait (Condition *self) |
| Waits indefinitely for this Condition to be signaled. More... | |
| _Bool | waitUntilDate (Condition *self, const Date *date) |
| Waits until the specified Date for this Condition to be signaled. More... | |
Methods inherited from Lock | |
| Class * | _Lock (void) |
| The Lock archetype. More... | |
| Lock * | init (Lock *self) |
| Initializes this Lock. More... | |
| void | lock (Lock *self) |
| Acquire this lock, waiting indefinitely. More... | |
| _Bool | tryLock (Lock *self) |
| Attempt to acquire this lock immediately. More... | |
| void | unlock (Lock *self) |
| Release this Lock. More... | |
Methods inherited from Object | |
| Class * | _Object (void) |
| The Object archetype. More... | |
| Object * | copy (const Object *self) |
| Creates a shallow copy of this Object. More... | |
| void | dealloc (Object *self) |
| Frees all resources held by this Object. More... | |
| String * | description (const Object *self) |
| int | hash (const Object *self) |
| Object * | init (Object *self) |
| Initializes this Object. More... | |
| _Bool | isEqual (const Object *self, const Object *other) |
| Tests equality of the other Object. More... | |
| _Bool | isKindOfClass (const Object *self, const Class *clazz) |
| Tests for Class hierarchy membership. More... | |
Protected Attributes | |
| ConditionInterface * | interface |
| The interface. More... | |
Protected Attributes inherited from Lock | |
| LockInterface * | interface |
| The interface. More... | |
Protected Attributes inherited from Object | |
| ObjectInterface * | interface |
| The interface. More... | |
|
protected |
The interface.
Definition at line 55 of file Condition.h.
| Lock Condition::lock |
The superclass.
Definition at line 49 of file Condition.h.
| Class * _Condition | ( | void | ) |
The Condition archetype.
Definition at line 141 of file Condition.c.
| void broadcast | ( | Condition * | self | ) |
Signals all Threads waiting on this Condition.
| self | The Condition. |
Definition at line 57 of file Condition.c.
Initializes this Condition.
| self | The Condition. |
NULL on error. Definition at line 67 of file Condition.c.
| void signal | ( | Condition * | self | ) |
| void wait | ( | Condition * | self | ) |
Waits until the specified Date for this Condition to be signaled.
true if this Condition was signaled before date, false otherwise. Definition at line 106 of file Condition.c.