MCPcopy Create free account
hub / github.com/catboost/catboost / TryAcquire

Method TryAcquire

util/system/mutex.cpp:90–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88#endif // _win_
89
90 inline bool TryAcquire() noexcept {
91#if defined(_win_)
92 return TryEnterCriticalSectionInt(&Obj);
93#else
94 int result = pthread_mutex_trylock(&Obj);
95 if (result == 0 || result == EBUSY) {
96 return result == 0;
97 }
98 Y_ABORT("mutex trylock failure (%s)", LastSystemErrorText(result));
99#endif
100 }
101
102 inline void Release() noexcept {
103#if defined(_win_)

Callers

nothing calls this directly

Calls 1

LastSystemErrorTextFunction · 0.70

Tested by

no test coverage detected