mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-26 02:18:04 +01:00
Remove trailing whitespace (#3668)
This commit is contained in:
@@ -35,19 +35,19 @@ class NotificationCenter;
|
||||
class Foundation_API PriorityNotificationQueue
|
||||
/// A PriorityNotificationQueue object provides a way to implement asynchronous
|
||||
/// notifications. This is especially useful for sending notifications
|
||||
/// from one thread to another, for example from a background thread to
|
||||
/// the main (user interface) thread.
|
||||
/// from one thread to another, for example from a background thread to
|
||||
/// the main (user interface) thread.
|
||||
///
|
||||
/// The PriorityNotificationQueue is quite similar to the NotificationQueue class.
|
||||
/// The only difference to NotificationQueue is that each Notification is tagged
|
||||
/// with a priority value. When inserting a Notification into the queue, the
|
||||
/// Notification is inserted according to the given priority value, with
|
||||
/// Notification is inserted according to the given priority value, with
|
||||
/// lower priority values being inserted before higher priority
|
||||
/// values. Therefore, the lower the numerical priority value, the higher
|
||||
/// the actual notification priority.
|
||||
/// the actual notification priority.
|
||||
///
|
||||
/// Notifications are dequeued in order of their priority.
|
||||
///
|
||||
///
|
||||
/// The PriorityNotificationQueue can also be used to distribute work from
|
||||
/// a controlling thread to one or more worker threads. Each worker thread
|
||||
/// repeatedly calls waitDequeueNotification() and processes the
|
||||
@@ -74,7 +74,7 @@ public:
|
||||
/// a call like
|
||||
/// notificationQueue.enqueueNotification(new MyNotification, 1);
|
||||
/// does not result in a memory leak.
|
||||
|
||||
|
||||
Notification* dequeueNotification();
|
||||
/// Dequeues the next pending notification.
|
||||
/// Returns 0 (null) if no notification is available.
|
||||
@@ -88,7 +88,7 @@ public:
|
||||
Notification* waitDequeueNotification();
|
||||
/// Dequeues the next pending notification.
|
||||
/// If no notification is available, waits for a notification
|
||||
/// to be enqueued.
|
||||
/// to be enqueued.
|
||||
/// The caller gains ownership of the notification and
|
||||
/// is expected to release it when done with it.
|
||||
/// This method returns 0 (null) if wakeUpAll()
|
||||
@@ -116,27 +116,27 @@ public:
|
||||
|
||||
void wakeUpAll();
|
||||
/// Wakes up all threads that wait for a notification.
|
||||
|
||||
|
||||
bool empty() const;
|
||||
/// Returns true iff the queue is empty.
|
||||
|
||||
|
||||
int size() const;
|
||||
/// Returns the number of notifications in the queue.
|
||||
|
||||
void clear();
|
||||
/// Removes all notifications from the queue.
|
||||
|
||||
bool hasIdleThreads() const;
|
||||
/// Returns true if the queue has at least one thread waiting
|
||||
|
||||
bool hasIdleThreads() const;
|
||||
/// Returns true if the queue has at least one thread waiting
|
||||
/// for a notification.
|
||||
|
||||
|
||||
static PriorityNotificationQueue& defaultQueue();
|
||||
/// Returns a reference to the default
|
||||
/// PriorityNotificationQueue.
|
||||
|
||||
protected:
|
||||
Notification::Ptr dequeueOne();
|
||||
|
||||
|
||||
private:
|
||||
typedef std::multimap<int, Notification::Ptr> NfQueue;
|
||||
struct WaitInfo
|
||||
|
||||
Reference in New Issue
Block a user