자잘한 수정, 이제 다른 소켓으로 쓰기 요청 할 수 있을 듯
This commit is contained in:
@@ -12,6 +12,19 @@ struct Snowflake {
|
||||
};
|
||||
std::uint64_t snowflake;
|
||||
};
|
||||
|
||||
bool operator==(const Snowflake& other) const {
|
||||
return snowflake == other.snowflake;
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
namespace std {
|
||||
template <>
|
||||
struct hash<Chattr::Snowflake> {
|
||||
std::size_t operator()(const Chattr::Snowflake& k) const {
|
||||
return std::hash<uint64_t>{}(k.snowflake);
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -64,9 +64,9 @@ public:
|
||||
handle_ = (HANDLE)_beginthreadex(nullptr, 0, thread_func, funcPtr, 0, nullptr);
|
||||
#elif __linux__
|
||||
int rc = pthread_create(&handle_, NULL, thread_func, funcPtr);
|
||||
#endif
|
||||
if (handle_ <= 0 || rc != 0)
|
||||
log::critical("pthread_create()");
|
||||
#endif
|
||||
}
|
||||
~Thread();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user