Kanzi  3.9.8
Kanzi Engine C++ API
kanzi::win32::Win32Fiber Class Reference

Class that represents the Win32 fiber. More...

#include <kanzi/core.ui/platform/windowing_ng/win32/win32_fiber.hpp>

Public Types

typedef void(* FiberProcPointer) (DefaultFiberContext *)
 Pointer to Win32 fiber function. More...
 

Public Member Functions

KZ_NO_DISCARD voidgetFiberData () const noexcept
 Gets the associated data for this fiber. More...
 
KZ_NO_DISCARD voidgetNativeHandle () const noexcept
 Gets the native fiber handle. More...
 
void switchToFiber () const noexcept
 Switches to this fiber. More...
 
 Win32Fiber (void *fiber)
 Constructor. More...
 
 Win32Fiber (FiberProcPointer fiberRoutine, DefaultFiberContext *fiberData)
 Constructor. More...
 

Static Public Member Functions

static bool convertFiberToThread () noexcept
 Converts the current fiber to thread. More...
 
static KZ_NO_DISCARD voidconvertThreadToFiber () noexcept
 Converts the current thread to fiber. More...
 
static KZ_NO_DISCARD voidgetCurrentFiber () noexcept
 Gets the current fiber handle. More...
 

Detailed Description

Class that represents the Win32 fiber.

Since
Kanzi 3.9.7

Member Typedef Documentation

typedef void(* kanzi::win32::Win32Fiber::FiberProcPointer) (DefaultFiberContext *)

Pointer to Win32 fiber function.

Constructor & Destructor Documentation

kanzi::win32::Win32Fiber::Win32Fiber ( void fiber)
explicit

Constructor.

Parameters
fiberFiber handle.
kanzi::win32::Win32Fiber::Win32Fiber ( FiberProcPointer  fiberRoutine,
DefaultFiberContext fiberData 
)
explicit

Constructor.

Parameters
fiberRoutineThe routine for the fiber to execute.
fiberDataFiber data to pass to the fiber routine.

Member Function Documentation

static KZ_NO_DISCARD void* kanzi::win32::Win32Fiber::convertThreadToFiber ( )
staticnoexcept

Converts the current thread to fiber.

Returns
The current fiber handle.
static bool kanzi::win32::Win32Fiber::convertFiberToThread ( )
staticnoexcept

Converts the current fiber to thread.

Returns
On success, true, otherwise false.
static KZ_NO_DISCARD void* kanzi::win32::Win32Fiber::getCurrentFiber ( )
staticnoexcept

Gets the current fiber handle.

Returns
The current fiber handle.
void kanzi::win32::Win32Fiber::switchToFiber ( ) const
noexcept

Switches to this fiber.

KZ_NO_DISCARD void* kanzi::win32::Win32Fiber::getFiberData ( ) const
noexcept

Gets the associated data for this fiber.

Returns
Fiber data.
KZ_NO_DISCARD void* kanzi::win32::Win32Fiber::getNativeHandle ( ) const
noexcept

Gets the native fiber handle.

Returns
Fiber handle.

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