File Exchange

image thumbnail

Safer wrapper for Windows-API Semaphore

version 1.0.1 (12.6 KB) by Igor
A semaphore for Matlab

1 Download

Updated 15 Oct 2018

GitHub view license on GitHub

Editor's Note: This file was selected as MATLAB Central Pick of the Week

A slightly safer Matlab wrapper for Win32-API Semaphore objects.
Allows to limit number of processes, that are allowed to enter a specific session of code simultaneously.
The code is based on by Andrew Smart.
The main changes in this version are:
* Allows to specify wait timeout
* Added a Matlab wrapper that automatically creates unique identifiers
* removed POSIX version

1. Run "semaphore_build_mex.m" to build the mex
2. Run "demo_semaphore.m" to take a look on how it works

Cite As

Igor (2020). Safer wrapper for Windows-API Semaphore (, GitHub. Retrieved .

Comments and Ratings (0)



Replaced `exist()` with `nargin`

Fixed a typo in description.

MATLAB Release Compatibility
Created with R2016b
Compatible with any release
Platform Compatibility
Windows macOS Linux