Skip to content

Conddestroy

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

Home › Threading Support Functions › CondDestroy

CondDestroy

Destroys a condition variable once no thread is waiting on it.

Syntax

Declare Sub CondDestroy ( ByVal handle As Any Ptr )

Parameters

  • handle

Description

Once the conditional is CondCreated and the threads are started, one of more of them (including the implicit main thread executing main program) can be set to CondWait for the conditional, they will be stopped until some other thread CondSignals that the waiting thread can restart. CondBroadcast can be used to restart all threads waiting for the conditional. At the end of the program CondDestroy must be used to avoid leaking resources in the OS.

Conddestroy destroys a condition variable, freeing the resources it might hold. No threads must be waiting on the condition variable on entrance to Conddestroy.

Remarks

Usage

CondDestroy ( handle )

Platform Differences

  • Conddestroy is not available with the DOS version / target of FreeBASIC, because multithreading is not supported by DOS kernel nor the used extender.

Dialect Differences

Differences from QB

  • New to FreeBASIC

See also

Examples

See CondCreate, CondWait, CondSignal, and CondBroadcast


Category: Threading Support Functions
Kind: sub


Reproduced from the FreeBASIC Wiki Manual under the GNU Free Documentation License 1.3 — with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts. Copyright © the FreeBASIC project and wiki contributors. See License.

Clone this wiki locally