New Async wrapper.

This commit is contained in:
XMRig 2020-10-21 08:09:44 +07:00
parent 6860450147
commit 87b4d97798
No known key found for this signature in database
GPG key ID: 446A53638BE94409
7 changed files with 157 additions and 37 deletions

View file

@ -22,7 +22,7 @@
#define XMRIG_ASYNC_H
#include <uv.h>
#include "base/tools/Object.h"
// since 2019.05.16, Version 1.29.0 (Stable)
@ -49,4 +49,29 @@ extern int uv_async_send(uv_async_t *async);
#endif
namespace xmrig {
class AsyncPrivate;
class IAsyncListener;
class Async
{
public:
XMRIG_DISABLE_COPY_MOVE_DEFAULT(Async)
Async(IAsyncListener *listener);
~Async();
void send();
private:
AsyncPrivate *d_ptr;
};
} // namespace xmrig
#endif /* XMRIG_ASYNC_H */