CondDestroy

Destroys a multi-threading conditional variable when it is no more needed

Syntax
	KeyPgDeclareDeclare KeyPgSubSub CondDestroy ( KeyPgByvalByVal handle KeyPgAsAs KeyPgAnyAny KeyPgPtrPtr )

Usage
	CondDestroy ( handle )

Parameters
	handle
		The handle of a conditional variable to destroy.

Description
	Once the conditional is KeyPgCondCreateCondCreated and the threads are started, one of 
	more of them (including the implicit main thread executing main program) 
	can be set to KeyPgCondWaitCondWait for the conditional, they will be stopped until 
	some other thread KeyPgCondSignalCondSignals that the waiting thread can restart. 
	KeyPgCondBroadcastCondBroadcast can be used to restart all threads waiting for the 
	conditional. At the end of the program KeyPgCondDestroy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.

Example
	See KeyPgCondCreateCondCreate, KeyPgCondWaitCondWait, KeyPgCondSignalCondSignal, and KeyPgCondBroadcastCondBroadcast

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
	* Threading is not allowed in CompilerOptlang-lang qb

Differences from QB
	* New to FreeBASIC

See also
	* KeyPgCondCreateCondCreate
	* KeyPgCondBroadcastCondBroadcast
	* KeyPgCondSignalCondSignal
	* KeyPgCondWaitCondWait
	* KeyPgThreadCreateThreadCreate

