mirror of
https://github.com/oxen-io/lokinet
synced 2023-12-14 06:53:00 +01:00
format
This commit is contained in:
parent
284c55f5aa
commit
6da13c876c
|
@ -7,8 +7,7 @@ template <typename T>
|
|||
static constexpr size_t alignment() {
|
||||
size_t idx = 0;
|
||||
size_t sz = sizeof(T);
|
||||
while(sz)
|
||||
{
|
||||
while (sz) {
|
||||
++idx;
|
||||
sz >>= 1;
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ void Pool::Join() {
|
|||
for (auto &t : threads) t.join();
|
||||
}
|
||||
|
||||
void Pool::QueueJob(const llarp_thread_job & job) {
|
||||
void Pool::QueueJob(const llarp_thread_job &job) {
|
||||
{
|
||||
lock_t lock(queue_mutex);
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
#include <llarp/threadpool.h>
|
||||
|
||||
#include <condition_variable>
|
||||
#include <mutex>
|
||||
#include <deque>
|
||||
#include <mutex>
|
||||
#include <thread>
|
||||
#include <vector>
|
||||
|
||||
|
@ -15,7 +15,7 @@ typedef std::mutex mtx_t;
|
|||
typedef std::unique_lock<mtx_t> lock_t;
|
||||
struct Pool {
|
||||
Pool(size_t sz);
|
||||
void QueueJob(const llarp_thread_job & job);
|
||||
void QueueJob(const llarp_thread_job& job);
|
||||
void Join();
|
||||
std::vector<std::thread> threads;
|
||||
std::deque<llarp_thread_job> jobs;
|
||||
|
|
Loading…
Reference in a new issue