Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fdb_kvdb] fix lock issue to fix block on first run #295

Merged
merged 1 commit into from
May 10, 2024

Conversation

mrchipset
Copy link
Contributor

Fix linux first run blocking issue (#285) due to db lock.

@armink armink merged commit 60675db into armink:master May 10, 2024
1 check passed
taokingithub pushed a commit to taokingithub/FlashDB that referenced this pull request May 20, 2024
虽然#295的实现可以解决首次调用fdb_kvdb_init死锁的问题,但先unlock再lock没有必要,原因如下:因为fdb_kvdb_init中加锁,其调用的_fdb_kv_load中的fdb_kv_set_default中又加锁,如果不用嵌套互斥锁会发生死锁,而fdb_kv_set_default函数只在_fdb_kv_load中调用,因此将其加减锁代码删除即可
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants