release
永続性サービスのミューテックスのアドバイザリ ロックを解除
説明
例
アドバイザリ ロックの解除
まず、永続性サービス コントローラー オブジェクトを作成し、そのオブジェクトを使用して永続性サービスを開始します。
ctrl = mps.cache.control('myRedisConnection','Redis','Port',4519); start(ctrl)
接続名を使用して、永続性サービスのミューテックスを作成します。
lk = mps.sync.mutex('myDbLock','Connection','myRedisConnection')
アドバイザリ ロックの取得を試みます。ロックが取得できない場合は、20 秒間取得を再試行します。
acquire(lk, 20);
ロックを解除します。
TF = release(lk)
TF = logical 1
入力引数
lk
— ミューテックス オブジェクト
永続性サービスのミューテックス オブジェクト
永続性サービス固有のミューテックス オブジェクト。永続性プロバイダーとして Redis™ を使用している場合、lk
は mps.sync.TimedRedisMutex
オブジェクトになります。永続性プロバイダーとして MATLAB® を使用している場合、lk
は mps.sync.TimedMATFileMutex
オブジェクトになります。
出力引数
TF
— logical 値
logical 配列
アドバイザリ ロックが正常に解除された場合、TF
は logical 1 (true)
であり、それ以外の場合は logical 0 (false)
です。
バージョン履歴
R2018b で導入
MATLAB コマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)