[+] TaskRunner::PostSignalTask
Instead of chaining waitables, or checking for nested state, or blocks; these tasks are assumed to be thread-local condition variable dispatchers.
Last aurora commit: 87131415
This commit is contained in:
parent
87131415c9
commit
baf6668e16
@ -149,6 +149,8 @@ class TaskRunner {
|
||||
|
||||
TaskRunner(const TaskRunner&) = delete;
|
||||
TaskRunner& operator=(const TaskRunner&) = delete;
|
||||
|
||||
virtual void PostSignalTask(std::unique_ptr<Task> task) = 0;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -116,7 +116,7 @@ void CollectionBarrier::ActivateStackGuardAndPostTask() {
|
||||
|
||||
V8::GetCurrentPlatform()
|
||||
->GetForegroundTaskRunner(reinterpret_cast<v8::Isolate*>(isolate))
|
||||
->PostTask(std::make_unique<BackgroundCollectionInterruptTask>(heap_));
|
||||
->PostSignalTask(std::make_unique<BackgroundCollectionInterruptTask>(heap_));
|
||||
}
|
||||
|
||||
void CollectionBarrier::StopTimeToCollectionTimer() {
|
||||
|
@ -4114,7 +4114,7 @@ void Heap::MemoryPressureNotification(MemoryPressureLevel level,
|
||||
isolate()->stack_guard()->RequestGC();
|
||||
auto taskrunner = V8::GetCurrentPlatform()->GetForegroundTaskRunner(
|
||||
reinterpret_cast<v8::Isolate*>(isolate()));
|
||||
taskrunner->PostTask(std::make_unique<MemoryPressureInterruptTask>(this));
|
||||
taskrunner->PostSignalTask(std::make_unique<MemoryPressureInterruptTask>(this));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -115,7 +115,7 @@ void IsolateSafepoint::InitiateGlobalSafepointScopeRaw(
|
||||
// wake it up.
|
||||
V8::GetCurrentPlatform()
|
||||
->GetForegroundTaskRunner(reinterpret_cast<v8::Isolate*>(isolate()))
|
||||
->PostTask(std::make_unique<GlobalSafepointInterruptTask>(heap_));
|
||||
->PostSignalTask(std::make_unique<GlobalSafepointInterruptTask>(heap_));
|
||||
|
||||
// Request an interrupt in case of long-running code.
|
||||
isolate()->stack_guard()->RequestGlobalSafepoint();
|
||||
|
Loading…
Reference in New Issue
Block a user