5#ifndef V8_HEAP_PARKED_SCOPE_H_
6#define V8_HEAP_PARKED_SCOPE_H_
27 ++local_heap_->nested_parked_scopes_;
32 DCHECK_LT(0, local_heap_->nested_parked_scopes_);
33 --local_heap_->nested_parked_scopes_;
34 local_heap_->Unpark();
49 local_heap_->Unpark();
155 return WaitFor(
mutex, rel_time);
159 using base::ConditionVariable::Wait;
160 using base::ConditionVariable::WaitFor;
189 return WaitFor(rel_time);
193 using base::Semaphore::Wait;
194 using base::Semaphore::WaitFor;
209 template <
typename ThreadCollection>
211 const ThreadCollection& threads);
212 template <
typename ThreadCollection>
214 const ThreadCollection& threads);
216 template <
typename ThreadCollection>
218 const ThreadCollection& threads) {
220 for (
auto& thread : threads) thread->Join();
Thread(const Options &options)
bool is_main_thread() const
ParkedMutexGuardIf(const ParkedMutexGuardIf &)=delete
ParkedMutexGuardIf & operator=(const ParkedMutexGuardIf &)=delete
ParkedMutexGuard(const ParkedMutexGuard &)=delete
ParkedMutexGuard & operator=(const ParkedMutexGuard &)=delete
~ParkedRecursiveMutexGuard()
ParkedRecursiveMutexGuard(const ParkedRecursiveMutexGuard &)=delete
ParkedRecursiveMutexGuard & operator=(const ParkedRecursiveMutexGuard &)=delete
base::RecursiveMutex * mutex_
ParkedScope(LocalHeap *local_heap)
ParkedScope(LocalIsolate *local_isolate)
LocalHeap *const local_heap_
ParkingConditionVariable()=default
void ParkedWait(const ParkedScope &scope, base::Mutex *mutex)
ParkingConditionVariable & operator=(const ParkingConditionVariable &)=delete
ParkingConditionVariable(const ParkingConditionVariable &)=delete
bool ParkedWaitFor(const ParkedScope &scope, base::Mutex *mutex, const base::TimeDelta &rel_time) V8_WARN_UNUSED_RESULT
ParkingSemaphore & operator=(const ParkingSemaphore &)=delete
bool ParkedWaitFor(const ParkedScope &scope, const base::TimeDelta &rel_time)
ParkingSemaphore(int count)
void ParkedWait(const ParkedScope &scope)
ParkingSemaphore(const ParkingSemaphore &)=delete
V8_INLINE void ParkedJoin(LocalIsolate *local_isolate)
void ParkedJoin(const ParkedScope &scope)
ParkingThread(const Options &options)
static void ParkedJoinAll(const ParkedScope &scope, const ThreadCollection &threads)
static V8_INLINE void ParkedJoinAll(LocalIsolate *local_isolate, const ThreadCollection &threads)
UnparkedScopeIfOnBackground(LocalIsolate *local_isolate)
UnparkedScopeIfOnBackground(LocalHeap *local_heap)
std::optional< UnparkedScope > scope_
UnparkedScope(LocalIsolate *local_isolate)
LocalHeap *const local_heap_
UnparkedScope(LocalHeap *local_heap)
DeclarationScope * scope_
#define DCHECK_LT(v1, v2)
#define V8_WARN_UNUSED_RESULT