File tree 1 file changed +7
-2
lines changed
src/main/kotlin/com/wsl/symlinks/vfs
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package com.wsl.symlinks.vfs
2
2
3
3
import ai.grazie.utils.WeakHashMap
4
4
import com.intellij.ide.AppLifecycleListener
5
+ import com.intellij.idea.IdeaLogger
5
6
import com.intellij.openapi.components.service
6
7
import com.intellij.openapi.diagnostic.Attachment
7
8
import com.intellij.openapi.diagnostic.DefaultLogger
@@ -46,7 +47,8 @@ class MyLogger(category: String): DefaultLogger(category) {
46
47
47
48
companion object {
48
49
fun setup () {
49
- Logger .setFactory { category -> MyLogger (category) }
50
+ // IdeaLogger.setFactory { category -> MyLogger(category) }
51
+ // Logger.setFactory { category -> MyLogger(category) }
50
52
}
51
53
// val logger = setup()
52
54
}
@@ -64,7 +66,10 @@ class WslSymlinksProvider(distro: String) {
64
66
fun getValue (): String? {
65
67
var elapsed = 0
66
68
while (value == null && elapsed < 500 ) {
67
- condition.await(10 , TimeUnit .MILLISECONDS )
69
+ if (myResourceLock.tryLock(10 , TimeUnit .MILLISECONDS )) {
70
+ condition.await(10 , TimeUnit .MILLISECONDS )
71
+ myResourceLock.unlock()
72
+ }
68
73
elapsed + = 10
69
74
}
70
75
if (this .value == null ) {
You can’t perform that action at this time.
0 commit comments