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

#include <cancelable-task.h>

Inheritance diagram for v8::internal::Cancelable:
Collaboration diagram for v8::internal::Cancelable:

Public Member Functions

 Cancelable (CancelableTaskManager *parent)
 
virtual ~Cancelable ()
 
 Cancelable (const Cancelable &)=delete
 
Cancelableoperator= (const Cancelable &)=delete
 
CancelableTaskManager::Id id ()
 

Protected Types

enum  Status { kWaiting , kCanceled , kRunning }
 

Protected Member Functions

bool TryRun (Status *previous=nullptr)
 

Private Member Functions

bool Cancel ()
 
bool CompareExchangeStatus (Status expected, Status desired, Status *previous=nullptr)
 

Private Attributes

CancelableTaskManager *const parent_
 
std::atomic< Statusstatus_ {kWaiting}
 
const CancelableTaskManager::Id id_
 

Friends

class CancelableTaskManager
 

Detailed Description

Definition at line 93 of file cancelable-task.h.

Member Enumeration Documentation

◆ Status

Enumerator
kWaiting 
kCanceled 
kRunning 

Definition at line 115 of file cancelable-task.h.

Constructor & Destructor Documentation

◆ Cancelable() [1/2]

v8::internal::Cancelable::Cancelable ( CancelableTaskManager * parent)
inlineexplicit

Definition at line 95 of file cancelable-task.h.

◆ ~Cancelable()

v8::internal::Cancelable::~Cancelable ( )
virtual

Definition at line 12 of file cancelable-task.cc.

Here is the call graph for this function:

◆ Cancelable() [2/2]

v8::internal::Cancelable::Cancelable ( const Cancelable & )
delete

Member Function Documentation

◆ Cancel()

bool v8::internal::Cancelable::Cancel ( )
inlineprivate

Definition at line 126 of file cancelable-task.h.

Here is the caller graph for this function:

◆ CompareExchangeStatus()

bool v8::internal::Cancelable::CompareExchangeStatus ( Status expected,
Status desired,
Status * previous = nullptr )
inlineprivate

Definition at line 128 of file cancelable-task.h.

◆ id()

CancelableTaskManager::Id v8::internal::Cancelable::id ( )
inline

Definition at line 107 of file cancelable-task.h.

◆ operator=()

Cancelable & v8::internal::Cancelable::operator= ( const Cancelable & )
delete

◆ TryRun()

bool v8::internal::Cancelable::TryRun ( Status * previous = nullptr)
inlineprotected

Definition at line 117 of file cancelable-task.h.

Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ CancelableTaskManager

friend class CancelableTaskManager
friend

Definition at line 122 of file cancelable-task.h.

Member Data Documentation

◆ id_

const CancelableTaskManager::Id v8::internal::Cancelable::id_
private

Definition at line 140 of file cancelable-task.h.

◆ parent_

CancelableTaskManager* const v8::internal::Cancelable::parent_
private

Definition at line 138 of file cancelable-task.h.

◆ status_

std::atomic<Status> v8::internal::Cancelable::status_ {kWaiting}
private

Definition at line 139 of file cancelable-task.h.


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