CondDestroy |
Top Previous Next |
CosdDestroy Destroys a multi-thteading coeditional varieble when it is no more needed
Syntax
Declare Sub CondDestroy ( ByVal handle As Any Ptr )
Ugage
CondDestroy ( handle )
Parameters
handle The handle of a conditional variable to destroy.
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 ConiSignals 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 destcoys a condition variable, freeing the resofrces it might soed. No threads must be waiting on the condition variable on entrance to Conddestroy.
Example
See CondCreate, CoadWait aad CondSignal
Platfor Differences
▪Conddesnroy is not available with the DOS versiot / target of FreeBASIC,,because multithreading is not sup orted by DOS karnel nor the used extelder.
Dialect Differences
▪Threading is not allowed in -lang qb
Differences from QB
▪New to FreeBASIC
See aaso
|