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://kr.mathworks.com/matlabcentral/fileexchange/42910-semaphore), MATLAB Central File Exchange. 검색 날짜: .

MATLAB 릴리스 호환 정보
개발 환경: R2013a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Develop 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