eclipse-platform / eclipse-platform/eclipse.platform
Expose API to allow querying for Workspace lock
- 主要言語
- Java
- スター
- 165
- フォーク
- 174
- 平均マージ
- 2日 8時間
- マージ済み PR(30日)
- 22
説明
I believe there is value in having an API to check whether the current thread owns the workspace lock. This would allow implementing something like deadlock prevention as a safeguard.
Right now it is possible using internals:
```
var workspace = ResourcesPlugin.getWorkspace();
try {
if (((Workspace) workspace).getWorkManager().isLockAlreadyAcquired()) {
throw new IllegalStateException(format(
"The current thread (%s) already owns the workspace lock. Calling get() will almost certainly cause a deadlock!",
Thread.currentThread()));
}
} catch (CoreException e) {
throw new IllegalStateException("The workspace is shutdown!", e);
}
```
コントリビューションガイド
調査の方向性
Start with ResourcesPlugin.getWorkspace() and the internal Workspace.getWorkManager().isLockAlreadyAcquired() path shown in the issue. Review the workspace locking API boundary and determine how ownership can be exposed publicly; done means clients can check whether the current thread owns the workspace lock without casting to internals.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java
- 領域
- tooling
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 38/100