| 1 |
#ifndef _LATER_H_ |
| 2 |
#define _LATER_H_ |
| 3 |
|
| 4 |
#include <memory> |
| 5 |
#include "callback_registry.h" |
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
#define LATER_DLL_API_VERSION 3 |
| 12 |
|
| 13 |
#define GLOBAL_LOOP 0 |
| 14 |
|
| 15 |
std::shared_ptr<CallbackRegistry> getGlobalRegistry(); |
| 16 |
|
| 17 |
bool execCallbacksForTopLevel(); |
| 18 |
bool at_top_level(); |
| 19 |
|
| 20 |
bool execCallbacks(double timeoutSecs, bool runAll, int loop_id); |
| 21 |
bool idle(int loop); |
| 22 |
|
| 23 |
void ensureInitialized(); |
| 24 |
|
| 25 |
|
| 26 |
void ensureAutorunnerInitialized(); |
| 27 |
|
| 28 |
uint64_t doExecLater(std::shared_ptr<CallbackRegistry> callbackRegistry, Rcpp::Function callback, double delaySecs, bool resetTimer); |
| 29 |
uint64_t doExecLater(std::shared_ptr<CallbackRegistry> callbackRegistry, void (*callback)(void*), void* data, double delaySecs, bool resetTimer); |
| 30 |
|
| 31 |
#endif |