MCPcopy Create free account
hub / github.com/Pagghiu/SaneCppLibraries / HttpClientLocalMutex

Method HttpClientLocalMutex

Libraries/HttpClient/HttpClient.cpp:516–527  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

514} // namespace
515
516SC::HttpClientLocalMutex::HttpClientLocalMutex()
517{
518 static_assert(sizeof(storage) >= sizeof(HttpClientLocalMutexStorage), "HttpClient mutex storage too small");
519 static_assert(alignof(HttpClientLocalMutex) >= alignof(HttpClientLocalMutexStorage),
520 "HttpClient mutex alignment mismatch");
521
522#if SC_PLATFORM_WINDOWS
523 InitializeCriticalSection(reinterpret_cast<HttpClientLocalMutexStorage*>(storage));
524#elif SC_PLATFORM_APPLE || SC_PLATFORM_LINUX
525 (void)pthread_mutex_init(reinterpret_cast<HttpClientLocalMutexStorage*>(storage), nullptr);
526#endif
527}
528
529SC::HttpClientLocalMutex::~HttpClientLocalMutex()
530{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected