Race condition.

This commit is contained in:
Philippe Pittoli 2025-04-25 17:53:53 +02:00
parent 6cb42f9953
commit 733e9605b4

View file

@ -2119,3 +2119,15 @@ cars.unsafe_delete key
.SOURCE
Unsafe operations on the database.
.QE
In DODB version \*[VERSION],
.gcolor red
there is no thread-safe modification
.gcolor
of a value, and probably won't ever be\*[*].
.FOOTNOTE1
This is a problem of the application rather than the library.
Having multiple threads updating a single value means that a value can be acquired then modified in two different threads at the same time in the application, which is a race condition.
This is a problem in and of itself, beside the storage bottleneck.
Measures should be taken inside the application to prevent this.
.FOOTNOTE2