Scoped lock of the session pool based on pool type (global_locked vs everything else)
| 417 | // Scoped lock of the session pool based on pool type |
| 418 | // (global_locked vs everything else) |
| 419 | inline bool |
| 420 | lockSessionPool(Ptr<ProxyMutex> &mutex, EThread *const ethread, TSServerSessionSharingPoolType const pool_type, |
| 421 | MutexLock *const mlock, MutexTryLock *const tlock) |
| 422 | { |
| 423 | bool locked = false; |
| 424 | if (TS_SERVER_SESSION_SHARING_POOL_GLOBAL_LOCKED == pool_type) { |
| 425 | SCOPED_MUTEX_LOCK(lock, mutex, ethread); |
| 426 | *mlock = std::move(lock); |
| 427 | locked = true; |
| 428 | } else { |
| 429 | MUTEX_TRY_LOCK(lock, mutex, ethread); |
| 430 | *tlock = std::move(lock); |
| 431 | locked = tlock->is_locked(); |
| 432 | } |
| 433 | return locked; |
| 434 | } |
| 435 | |
| 436 | } // namespace |
| 437 |
no outgoing calls
no test coverage detected