v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8::JobTask Class Referenceabstract

#include <v8-platform.h>

Inheritance diagram for v8::JobTask:
Collaboration diagram for v8::JobTask:

Public Member Functions

virtual ~JobTask ()=default
 
virtual void Run (JobDelegate *delegate)=0
 
virtual size_t GetMaxConcurrency (size_t worker_count) const =0
 

Detailed Description

A JobTask represents work to run in parallel from Platform::PostJob().

Definition at line 300 of file v8-platform.h.

Constructor & Destructor Documentation

◆ ~JobTask()

virtual v8::JobTask::~JobTask ( )
virtualdefault

Member Function Documentation

◆ GetMaxConcurrency()

virtual size_t v8::JobTask::GetMaxConcurrency ( size_t worker_count) const
pure virtual

Controls the maximum number of threads calling Run() concurrently, given the number of threads currently assigned to this job and executing Run(). Run() is only invoked if the number of threads previously running Run() was less than the value returned. In general, this should return the latest number of incomplete work items (smallest unit of work) left to process, including items that are currently in progress. |worker_count| is the number of threads currently assigned to this job which some callers may need to determine their return value. Since GetMaxConcurrency() is a leaf function, it must not call back any JobHandle methods.

Implemented in cppgc::internal::WeakCallbackJobTask, v8::DelayedTasksPlatform::DelayedJob, v8::internal::ArrayBufferSweeper::SweepingState::SweepingJob, v8::internal::baseline::ConcurrentBaselineCompiler::JobDispatcher, v8::internal::ConcurrentMarking::JobTaskMajor, v8::internal::ConcurrentMarking::JobTaskMinor, v8::internal::LazyCompileDispatcher::JobTask, v8::internal::maglev::MaglevConcurrentDispatcher::JobTask, v8::internal::OptimizingCompileTaskExecutor::CompileTask, v8::internal::PageEvacuationJob, v8::internal::PointersUpdatingJob, v8::internal::ScavengerCollector::JobTask, v8::internal::ScavengerCollector::QuarantinedPageSweeper::JobTask, v8::internal::Sweeper::MajorSweeperJob, v8::internal::Sweeper::MinorSweeperJob, v8::internal::wasm::DeserializeCodeTask, and v8::internal::wasm::ValidateFunctionsStreamingJob.

◆ Run()


The documentation for this class was generated from the following file: