Kanzi 3.9.10
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.
 

Public Member Functions

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

Static Public Member Functions

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

Detailed Description

Class that represents the Win32 fiber.

Since
Kanzi 3.9.7

Member Typedef Documentation

◆ FiberProcPointer

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

Pointer to Win32 fiber function.

Constructor & Destructor Documentation

◆ Win32Fiber() [1/2]

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

Constructor.

Parameters
fiberFiber handle.

◆ Win32Fiber() [2/2]

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

◆ convertThreadToFiber()

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

Converts the current thread to fiber.

Returns
The current fiber handle.

◆ convertFiberToThread()

static bool kanzi::win32::Win32Fiber::convertFiberToThread ( )
staticnoexcept

Converts the current fiber to thread.

Returns
On success, true, otherwise false.

◆ getCurrentFiber()

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

Gets the current fiber handle.

Returns
The current fiber handle.

◆ switchToFiber()

void kanzi::win32::Win32Fiber::switchToFiber ( ) const
noexcept

Switches to this fiber.

◆ getFiberData()

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

Gets the associated data for this fiber.

Returns
Fiber data.

◆ getNativeHandle()

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: