MutexLock
 
Acquires a mutex

Syntax

Declare Sub MutexLock ( ByVal id As Any Ptr )

Usage

MutexLock( id )

Parameters

id
The Any Ptr handle of the mutex to be locked.

Description

Mutexlock halts any other threads using a mutex "handle", generated by MutexCreate, until the handle is unlocked with MutexUnlock.

See MutexCreate for more general information on mutexes.

Example

See the examples in MutexCreate and also ThreadCreate.

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