reverbrain / eblob

Eblob is an append-only low-level IO library, which saves data in blob files. Created as low-level backend for elliptics
GNU Lesser General Public License v3.0
104 stars 29 forks source link

Synchronization mechanism in stats updating changed. IO stats merged into global stats. #60

Closed aborg-dev closed 10 years ago

aborg-dev commented 10 years ago

To provide thread-safety during stats updates we use atomic_t type. On platforms where it is possible it uses __sync_add_and_fetch. When this option is not supported, it uses simple lock to assure atomic updates.