🎨 Improve kernel stability by eliminating some data races https://github.com/siyuan-note/siyuan/issues/9842

This commit is contained in:
Daniel 2023-12-08 13:15:52 +08:00
parent bea32e96d5
commit 26e3f6807b
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
2 changed files with 10 additions and 6 deletions

View file

@ -174,8 +174,12 @@ func IsBooted() bool {
return 100 <= bootProgress.Load()
}
func GetBootProgressDetails() (int32, string) {
return bootProgress.Load(), bootDetails
func GetBootProgressDetails() (progress int32, details string) {
progress = bootProgress.Load()
bootDetailsLock.Lock()
details = bootDetails
bootDetailsLock.Unlock()
return
}
func GetBootProgress() int32 {