Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

maint: Replace use of folly getCurrentThreadId with STL #1408

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cpp/arcticdb/util/storage_lock.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@
#include <arcticdb/util/exponential_backoff.hpp>
#include <arcticdb/util/configs_map.hpp>

#include <folly/system/ThreadId.h>

#include <mutex>
#include <thread>

namespace arcticdb {

Expand Down Expand Up @@ -67,7 +66,8 @@ struct StorageLockTimeout : public std::runtime_error {
};

inline uint64_t get_thread_id() {
return folly::getCurrentThreadID();
auto thread_id = std::this_thread::get_id();
return std::hash<std::thread::id>()(thread_id);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function is only used in logging, so can return the std::thread::id directly provided fmt can handle it

}

template <class ClockType = util::SysClock>
Expand Down
Loading