Add a new HashSet template
* Intended to replace RBSet in most cases. * Optimized for iteration speed
This commit is contained in:
parent
410893ad0f
commit
45af29da80
243 changed files with 1400 additions and 662 deletions
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue