Skip to content
This repository has been archived by the owner on Apr 19, 2024. It is now read-only.

Commit

Permalink
update: better object_pool
Browse files Browse the repository at this point in the history
  • Loading branch information
gaowanlu committed Mar 11, 2024
1 parent ec4fdb0 commit b0bffe1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/utility/object_pool.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#pragma once
#include <set>
#include <unordered_set>

#include "thread/mutex.h"
#include "thread/auto_lock.h"
Expand Down Expand Up @@ -42,7 +42,7 @@ namespace tubekit
uint space();

private:
std::set<T *> m_set;
std::unordered_set<T *> m_set;

/**
* @brief ensure thread safety for m_list operations
Expand Down Expand Up @@ -124,4 +124,4 @@ namespace tubekit
return space;
}
}
}
}

0 comments on commit b0bffe1

Please sign in to comment.