Skip to content

Category Threading Support Functions

Paul Squires edited this page Oct 19, 2026 · 2 revisions

Home › All Categories › Threading Support Functions

Threading Support Functions

Grouped by task. Running things at once lists them beside the rest of the area.

Start and wait for threads

Function What it does From
ThreadCreate Starts a procedure on a new thread, passing it one pointer; returns the thread handle. built-in
ThreadWait Waits for a thread to finish, then releases its handle. built-in
ThreadDetach Releases a thread handle without waiting; the thread runs on to its end. fbthread.bi
ThreadSelf Returns the handle of the thread that calls it. fbthread.bi

Lock shared data with a mutex

Function What it does From
MutexCreate Creates a mutex and returns its handle, or 0 on failure. built-in
MutexLock Locks a mutex, waiting while another thread holds it. built-in
MutexUnlock Unlocks a mutex so that a waiting thread can take it. built-in
MutexDestroy Destroys a mutex once no thread is using it. built-in

Wait for a signal with a condition variable

Function What it does From
CondCreate Creates a condition variable and returns its handle, or 0 on failure. built-in
CondWait Unlocks the mutex and waits for a signal, then locks the mutex again. built-in
CondSignal Wakes one thread waiting on the condition; the signal is lost if none is waiting. built-in
CondBroadcast Wakes every thread waiting on the condition. built-in
CondDestroy Destroys a condition variable once no thread is waiting on it. built-in

Also in this category


Home · Keyword Index

Clone this wiki locally