Add a new HashSet template

* Intended to replace RBSet in most cases.
* Optimized for iteration speed
This commit is contained in:
reduz 2022-05-19 17:00:06 +02:00
parent 410893ad0f
commit 45af29da80
243 changed files with 1400 additions and 662 deletions

View file

@ -282,7 +282,7 @@ void EditorFileServer::_thread_start(void *s) {
self->wait_mutex.lock();
while (self->to_wait.size()) {
Thread *w = self->to_wait.front()->get();
Thread *w = *self->to_wait.begin();
self->to_wait.erase(w);
self->wait_mutex.unlock();
w->wait_to_finish();

View file

@ -55,7 +55,7 @@ class EditorFileServer : public Object {
};
Ref<TCPServer> server;
RBSet<Thread *> to_wait;
HashSet<Thread *> to_wait;
static void _close_client(ClientData *cd);
static void _subthread_start(void *s);