|
wxMaxima
|
The hand-over of Maxima's output from the socket thread to the GUI. More...
#include "MaximaItemQueue.h"Functions | |
| DrainResult | DrainForAtMost (std::chrono::milliseconds budget, const std::function< bool(MaximaItemQueue::Item &)> &take, const std::function< bool(const MaximaItemQueue::Item &)> &dispatch) |
| Hands items to dispatch() until none is left or the time is used up. | |
The hand-over of Maxima's output from the socket thread to the GUI.
| DrainResult DrainForAtMost | ( | std::chrono::milliseconds | budget, |
| const std::function< bool(MaximaItemQueue::Item &)> & | take, | ||
| const std::function< bool(const MaximaItemQueue::Item &)> & | dispatch | ||
| ) |
Hands items to dispatch() until none is left or the time is used up.
Always handles at least one item, so a single item that takes longer than the whole budget can't stall the queue.
| budget | How long to keep dispatching |
| take | Fetches the next item; false if there is none |
| dispatch | Handles one item; false stops the loop (for example because the connection the items came from is gone) |