Symbian platform (C++)
SDK native APIs, runtime and tooling
Loading...
Searching...
No Matches
thread::Fiber Class Reference

#include <cpp/symbian/concurrency/guest/thread/fiber.h>

Classes

struct  Impl
 

Public Types

using Work = absl::AnyInvocable< void() && >
 
using Work = absl::AnyInvocable< void() && >
 

Public Member Functions

 Fiber (Scheduler &scheduler, Work work, std::size_t stack_bytes=kDefaultStackBytes)
 
template<typename F >
requires (std::is_invocable_r_v<void, std::decay_t<F>> && !std::is_same_v<std::decay_t<F>, Work>)
 Fiber (Scheduler &scheduler, F &&work, std::size_t stack_bytes=kDefaultStackBytes)
 
 Fiber (const Fiber &)=delete
 
Fiber & operator= (const Fiber &)=delete
 
 ~Fiber ()
 
bool Finished () const noexcept
 
void Cancel ()
 
bool Cancelled () const noexcept
 
Case OnCancel () const
 
 Fiber (Work work)
 
template<typename F >
requires (std::is_invocable_r_v<void, std::decay_t<F>> && !std::is_same_v<std::decay_t<F>, Work>)
 Fiber (F &&work)
 
 Fiber (const Fiber &)=delete
 
Fiber & operator= (const Fiber &)=delete
 
 Fiber (Fiber &&)=delete
 
Fiber & operator= (Fiber &&)=delete
 
 ~Fiber ()
 
void Cancel () noexcept
 
bool Cancelled () const noexcept
 
Case OnCancel () const
 
bool Finished () const noexcept
 
absl::Status Join ()
 

Static Public Member Functions

static Fiber * Current () noexcept
 
static void Yield ()
 
static void SleepFor (absl::Duration duration)
 
static Fiber * Current () noexcept
 

Static Public Attributes

static constexpr std::size_t kDefaultStackBytes = 16 * 1024
 

Friends

class Scheduler
 
class Mutex
 
class CondVar
 
void FiberEntry ()
 

Member Typedef Documentation

◆ Work [1/2]

using thread::Fiber::Work = absl::AnyInvocable<void() &&>

◆ Work [2/2]

using thread::Fiber::Work = absl::AnyInvocable<void() &&>

Constructor & Destructor Documentation

◆ Fiber() [1/7]

thread::Fiber::Fiber ( Scheduler &  scheduler,
Work  work,
std::size_t  stack_bytes = kDefaultStackBytes 
)

◆ Fiber() [2/7]

template<typename F >
requires (std::is_invocable_r_v<void, std::decay_t<F>> && !std::is_same_v<std::decay_t<F>, Work>)
thread::Fiber::Fiber ( Scheduler &  scheduler,
F &&  work,
std::size_t  stack_bytes = kDefaultStackBytes 
)
inline

◆ Fiber() [3/7]

thread::Fiber::Fiber ( const Fiber &  )
delete

◆ ~Fiber() [1/2]

thread::Fiber::~Fiber ( )

◆ Fiber() [4/7]

thread::Fiber::Fiber ( Work  work)
explicit

◆ Fiber() [5/7]

template<typename F >
requires (std::is_invocable_r_v<void, std::decay_t<F>> && !std::is_same_v<std::decay_t<F>, Work>)
thread::Fiber::Fiber ( F &&  work)
inlineexplicit

◆ Fiber() [6/7]

thread::Fiber::Fiber ( const Fiber &  )
delete

◆ Fiber() [7/7]

thread::Fiber::Fiber ( Fiber &&  )
delete

◆ ~Fiber() [2/2]

thread::Fiber::~Fiber ( )

Member Function Documentation

◆ Cancel() [1/2]

void thread::Fiber::Cancel ( )
noexcept

◆ Cancel() [2/2]

void thread::Fiber::Cancel ( )
noexcept

◆ Cancelled() [1/2]

bool thread::Fiber::Cancelled ( ) const
noexcept

◆ Cancelled() [2/2]

bool thread::Fiber::Cancelled ( ) const
noexcept

◆ Current() [1/2]

Fiber * thread::Fiber::Current ( )
staticnoexcept

◆ Current() [2/2]

static Fiber * thread::Fiber::Current ( )
staticnoexcept

◆ Finished() [1/2]

bool thread::Fiber::Finished ( ) const
inlinenoexcept

◆ Finished() [2/2]

bool thread::Fiber::Finished ( ) const
noexcept

◆ Join()

absl::Status thread::Fiber::Join ( )

◆ OnCancel() [1/2]

Case thread::Fiber::OnCancel ( ) const

◆ OnCancel() [2/2]

Case thread::Fiber::OnCancel ( ) const

◆ operator=() [1/3]

Fiber & thread::Fiber::operator= ( const Fiber &  )
delete

◆ operator=() [2/3]

Fiber & thread::Fiber::operator= ( const Fiber &  )
delete

◆ operator=() [3/3]

Fiber & thread::Fiber::operator= ( Fiber &&  )
delete

◆ SleepFor()

void thread::Fiber::SleepFor ( absl::Duration  duration)
static

◆ Yield()

void thread::Fiber::Yield ( )
static

Friends And Related Symbol Documentation

◆ CondVar

friend class CondVar
friend

◆ FiberEntry

void FiberEntry ( )
friend

◆ Mutex

friend class Mutex
friend

◆ Scheduler

friend class Scheduler
friend

Member Data Documentation

◆ kDefaultStackBytes

constexpr std::size_t thread::Fiber::kDefaultStackBytes = 16 * 1024
staticconstexpr

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