[*] Update ILoopQueue.hpp documentation

This commit is contained in:
Reece Wilson 2022-04-16 16:36:13 +01:00
parent fd423c88df
commit 790e879fe4

View File

@ -79,9 +79,11 @@ namespace Aurora::Loop
* dequeued. No user code explicitly told us to do anything other than wait, so the default behaviour of Wait[Any[Ex]]
* shall be to not evict loop sources, until at least one callback is registered, or until SourceRemove is called.
*
* Returning true from a ILoopSourceSubscriber will allow the ILoopQueue to evict the loop source
* Returning false from a ILoopSourceSubscriber will prevent eviction, resulting in continued ILoopSourceSubscriber callbacks to all subscribers
* Returning true from a ILoopSourceSubscriber will allow the ILoopQueue to evict the loop source and callback. A call to ::Commit is not required.
* Returning false from a ILoopSourceSubscriber will prevent eviction, resulting in continued ILoopSourceSubscriber callbacks to other subscribers
*
* Once all callbacks are evicited, loop sources are automatically dequeued; however, objects without a callback shall not be dequeued.
*
* @param source
* @param subscriber
* @return
@ -91,7 +93,10 @@ namespace Aurora::Loop
/**
* @brief Identical behaviour to that of the basic method. In addition, ILoopSourceSubscriberEx::OnTimeout is called
* on violation of the timeout provided to SourceAddWithTimeout
* on violation of the timeout provided to SourceAddWithTimeout, and the OnFinished method has been extended to
* accept a position number. This is the position of the subscriber relative to the signal-state change tick.
* If the loop source is singleshot, and multiple callbacks are registered, all callbacks will be called with
* a position counter. Furthermore, extended callbacks are called __before__ non-ex variants.
* @param source
* @param subscriber
* @return
@ -100,8 +105,9 @@ namespace Aurora::Loop
virtual bool AddCallbackEx(const AuSPtr<ILoopSource> &source, const AuSPtr<ILoopSourceSubscriberEx> &subscriber) = 0;
/**
* @brief Near identical behaviour of the extended AddCallback method.
* Registers a callback to handle all loop source signaled events.
* @brief
* Registers a callback to be called when either, an loop source has no callbacks, or a loop source could be dequeued.
* Returning false from OnFinished shall prevent the loop queue from decommitting the loop source.
* @param subscriber
* @return
* @note thread safe | can be called alongside any other function marked as such