Class Thread
public class Thread
- Inheritance
-
Thread
- Inherited Members
Methods
Create(ThreadFunc, nint, bool, out ErrorOwnedHandle)
Calls native function g_thread_create.
public static extern ThreadOwnedHandle Create(ThreadFunc func, nint data, bool joinable, out ErrorOwnedHandle error)
Parameters
func
ThreadFuncTransfer ownership: None Nullable: False
data
nintTransfer ownership: None Nullable: True
joinable
boolTransfer ownership: None Nullable: False
error
ErrorOwnedHandle
Returns
- ThreadOwnedHandle
Transfer ownership: Full Nullable: False
CreateFull(ThreadFunc, nint, CULong, bool, bool, ThreadPriority, out ErrorOwnedHandle)
Calls native function g_thread_create_full.
public static extern ThreadOwnedHandle CreateFull(ThreadFunc func, nint data, CULong stackSize, bool joinable, bool bound, ThreadPriority priority, out ErrorOwnedHandle error)
Parameters
func
ThreadFuncTransfer ownership: None Nullable: False
data
nintTransfer ownership: None Nullable: True
stackSize
CULongTransfer ownership: None Nullable: False
joinable
boolTransfer ownership: None Nullable: False
bound
boolTransfer ownership: None Nullable: False
priority
ThreadPriorityTransfer ownership: None Nullable: False
error
ErrorOwnedHandle
Returns
- ThreadOwnedHandle
Transfer ownership: Full Nullable: False
ErrorQuark()
Calls native function g_thread_error_quark.
public static extern uint ErrorQuark()
Returns
- uint
Transfer ownership: None Nullable: False
Exit(nint)
Calls native function g_thread_exit.
public static extern void Exit(nint retval)
Parameters
retval
nintTransfer ownership: None Nullable: True
Foreach(Func, nint)
Calls native function g_thread_foreach. Version: 2.10
[Version("2.10")]
public static extern void Foreach(Func threadFunc, nint userData)
Parameters
threadFunc
FuncTransfer ownership: None Nullable: False
userData
nintTransfer ownership: None Nullable: True
GetGType()
Calls native function g_thread_get_type.
public static extern nuint GetGType()
Returns
- nuint
Transfer ownership: None Nullable: False
GetInitialized()
Calls native function g_thread_get_initialized. Version: 2.20
[Version("2.20")]
public static extern bool GetInitialized()
Returns
- bool
Transfer ownership: None Nullable: False
Init(nint)
Calls native function g_thread_init.
public static extern void Init(nint vtable)
Parameters
vtable
nintTransfer ownership: None Nullable: True
InitWithErrorcheckMutexes(nint)
Calls native function g_thread_init_with_errorcheck_mutexes.
public static extern void InitWithErrorcheckMutexes(nint vtable)
Parameters
vtable
nintTransfer ownership: None Nullable: True
Join(ThreadUnownedHandle)
Calls native method g_thread_join.
public static extern nint Join(ThreadUnownedHandle thread)
Parameters
thread
ThreadUnownedHandleTransfer ownership: Full Nullable: False
Returns
- nint
Transfer ownership: Full Nullable: True
New(NullableUtf8StringHandle, ThreadFunc, nint)
Calls native constructor g_thread_new. Version: 2.32
[Version("2.32")]
public static extern ThreadOwnedHandle New(NullableUtf8StringHandle name, ThreadFunc func, nint data)
Parameters
name
NullableUtf8StringHandleTransfer ownership: None Nullable: True
func
ThreadFuncTransfer ownership: None Nullable: False
data
nintTransfer ownership: None Nullable: True
Returns
- ThreadOwnedHandle
Transfer ownership: Full Nullable: False
Ref(ThreadHandle)
Calls native method g_thread_ref. Version: 2.32
[Version("2.32")]
public static extern ThreadOwnedHandle Ref(ThreadHandle thread)
Parameters
thread
ThreadHandleTransfer ownership: None Nullable: False
Returns
- ThreadOwnedHandle
Transfer ownership: Full Nullable: False
Self()
Calls native function g_thread_self.
public static extern ThreadUnownedHandle Self()
Returns
- ThreadUnownedHandle
Transfer ownership: None Nullable: False
SetPriority(ThreadHandle, ThreadPriority)
Calls native method g_thread_set_priority.
public static extern void SetPriority(ThreadHandle thread, ThreadPriority priority)
Parameters
thread
ThreadHandleTransfer ownership: None Nullable: False
priority
ThreadPriorityTransfer ownership: None Nullable: False
TryNew(NullableUtf8StringHandle, ThreadFunc, nint, out ErrorOwnedHandle)
Calls native constructor g_thread_try_new. Version: 2.32
[Version("2.32")]
public static extern ThreadOwnedHandle TryNew(NullableUtf8StringHandle name, ThreadFunc func, nint data, out ErrorOwnedHandle error)
Parameters
name
NullableUtf8StringHandleTransfer ownership: None Nullable: True
func
ThreadFuncTransfer ownership: None Nullable: False
data
nintTransfer ownership: None Nullable: True
error
ErrorOwnedHandle
Returns
- ThreadOwnedHandle
Transfer ownership: Full Nullable: False
Unref(ThreadUnownedHandle)
Calls native method g_thread_unref. Version: 2.32
[Version("2.32")]
public static extern void Unref(ThreadUnownedHandle thread)
Parameters
thread
ThreadUnownedHandleTransfer ownership: Full Nullable: False
Yield()
Calls native function g_thread_yield.
public static extern void Yield()