Skip to content

Commit

Permalink
use std::unordered_map in fiber-manager global maps
Browse files Browse the repository at this point in the history
Summary:
The global maps are used only in the slow-path, so simplicity is better.

The simplicity also allows simpler access to the list of extant fiber-managers in the debugger, with needing the gdb scripts only to support `std::unordered_map` and not also `folly::F14NodeMap`.

Reviewed By: jaesoo-fb

Differential Revision: D45919505

fbshipit-source-id: fa354b60344809ff2a2e234945b3f19873b76ac4
  • Loading branch information
yfeldblum authored and facebook-github-bot committed May 17, 2023
1 parent 0ed7a85 commit a8e92f1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion third-party/folly/src/folly/fibers/FiberManagerMap-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#pragma once

#include <memory>
#include <unordered_map>

#include <folly/Function.h>
#include <folly/ScopeGuard.h>
Expand Down Expand Up @@ -99,7 +100,7 @@ class GlobalCache {
}

std::mutex mutex_;
folly::F14NodeMap<Key<EventBaseT>, std::unique_ptr<FiberManager>> map_;
std::unordered_map<Key<EventBaseT>, std::unique_ptr<FiberManager>> map_;
};

constexpr size_t kEraseListMaxSize = 64;
Expand Down

0 comments on commit a8e92f1

Please sign in to comment.