mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-22 12:33:29 +00:00
Reduce potential surprise in DeferringAsyncTaskQueue::flush.
This commit is contained in:
parent
d4c7ce2d6f
commit
93679f8d48
@ -103,3 +103,8 @@ void DeferringAsyncTaskQueue::perform() {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void DeferringAsyncTaskQueue::flush() {
|
||||
perform();
|
||||
AsyncTaskQueue::flush();
|
||||
}
|
||||
|
@ -87,6 +87,11 @@ class DeferringAsyncTaskQueue: public AsyncTaskQueue {
|
||||
*/
|
||||
void perform();
|
||||
|
||||
/*!
|
||||
Blocks the caller until all previously-enqueud functions have completed.
|
||||
*/
|
||||
void flush();
|
||||
|
||||
private:
|
||||
// TODO: this is a shared_ptr because of the issues capturing moveables in C++11;
|
||||
// switch to a unique_ptr if/when adapting to C++14
|
||||
|
Loading…
Reference in New Issue
Block a user