Skip to content

Mutexunlock

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

Home › Threading Support Functions › MutexUnlock

MutexUnlock

Unlocks a mutex so that a waiting thread can take it.

Syntax

Declare Sub MutexUnlock ( ByVal id As Any Ptr )

Parameters

  • id

Description

Mutexunlock releases a mutex "handle" created by MutexCreate, and locked with MutexLock. This allows other threads sharing the mutex to continue execution.

See MutexCreate for more general information on mutexes.

Remarks

Usage

MutexUnlock( id )

Dialect Differences

  • Threading is not allowed in the -lang qb dialect.

Platform Differences

  • The DOS version of FreeBASIC does not allow for threads, as the OS does not support them. In Linux the threads are always started in the order they are created, this can't be assumed in Win32. It's an OS, not a FreeBASIC issue.

Differences from QB

  • New to FreeBASIC

See also

Examples

See the examples in MutexCreate and also ThreadCreate.


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