|
Hi Guys, Sorry for the stupid question, could not find this in README. Is insert operation thread safe? I guess I can do simultaneous reads without any problem, but what about writes? |
Answered by
ankraft
Dec 16, 2022
Replies: 3 comments
|
Unfortunately, TinyDB in general is not thread-safe and you might need to use locking. See msiemens/tinydb#452 |
0 replies
Answer selected by
VPaulV
|
I see, thank you! I guess I can use something like tinyrecord for this purpose |
0 replies
|
I am not sure that tinyrecord provides thread safety. It provides transactional requests. from threading import Lock
myLock = Lock()
...
with myLock:
tinydbTable.operation() |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Unfortunately, TinyDB in general is not thread-safe and you might need to use locking. See msiemens/tinydb#452