MCPcopy Create free account
hub / github.com/apache/impala / AcquireThreadToken

Method AcquireThreadToken

be/src/runtime/thread-resource-mgr.h:124–128  ·  view source on GitHub ↗

Acquire a thread for the pool. This will always succeed; the pool will go over the quota if needed. Pools should use this API to reserve threads they need in order to make progress.

Source from the content-addressed store, hash-verified

122 /// quota if needed. Pools should use this API to reserve threads they need in order to
123 /// make progress.
124 void AcquireThreadToken() {
125 int64_t num_threads = num_threads_.Add(1);
126 int64_t num_required = num_threads & REQUIRED_MASK;
127 DCHECK_LE(num_required, max_required_threads_);
128 }
129
130 /// Try to acquire a thread for this pool. If the pool is at the quota, this will
131 /// return false and the pool should not run. Pools should use this API for resources

Callers 4

ThreadAvailableCbMethod · 0.80
TESTFunction · 0.80
PrepareMethod · 0.80

Calls 1

AddMethod · 0.45

Tested by 1

TESTFunction · 0.64