1
1
Fork 0
mirror of https://github.com/oxen-io/lokinet synced 2023-12-14 06:53:00 +01:00
This commit is contained in:
Jeff Becker 2018-02-18 13:15:45 -05:00
parent a5de70310d
commit 3e4fe88b26
No known key found for this signature in database
GPG key ID: F357B3B42F6F9B05

View file

@ -5,7 +5,6 @@
#include <mutex>
#include <queue>
struct llarp_ev_caller {
static void *operator new(size_t sz) {
return llarp::Alloc<llarp_ev_caller>();
@ -22,14 +21,16 @@ struct llarp_ev_caller {
bool appendCall(void *user) {
std::unique_lock<std::mutex> lock(access);
pending.emplace_back(std::move(llarp_ev_async_call{loop, this, user, this->work}));
pending.emplace_back(
std::move(llarp_ev_async_call{loop, this, user, this->work}));
return true;
}
bool appendManyCalls(void **users, size_t n) {
std::unique_lock<std::mutex> lock(access);
while (n--) {
pending.emplace_back(std::move(llarp_ev_async_call{loop, this, *users, this->work}));
pending.emplace_back(
std::move(llarp_ev_async_call{loop, this, *users, this->work}));
users++;
}
return true;