Semaphore

バージョン 1.2.0.0 (1.41 KB) 作成者: Kevin Wang
Simple semaphore implementation wrapping around Matlab's waitfor.
ダウンロード: 750
更新 2013/8/9

ライセンスの表示

Matlab has a waitfor function but it only works if you have a figure handle, leading to some somewhat out-of-place code if you want to use it with callbacks.

Semaphore.m is a simple wrapper around waitfor to make downstream code a little cleaner. To use it, create a Semaphore object. If this object is passed to an event handler or timer, then that handler can call Semaphore.Release() when it's finished.

If another thread as a Semaphore.Wait() call, it will wait until the respective Semaphore has been released.

Inspired by http://www.mathworks.com/matlabcentral/fileexchange/32489-semaphore, but I wanted something that didn't require an external library.

引用

Kevin Wang (2026). Semaphore (https://jp.mathworks.com/matlabcentral/fileexchange/42910-semaphore), MATLAB Central File Exchange. 取得日: .

MATLAB リリースの互換性
作成: R2013a
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux
カテゴリ
Help Center および MATLAB AnswersDevelop Apps Using App Designer についてさらに検索
謝辞

ヒントを得たファイル: semaphore

バージョン 公開済み リリース ノート
1.2.0.0

Removed eval() calls.

1.1.0.0

Updated to reuse existing figures to save memory and improve performance.

1.0.0.0