google/leveldb

Make background thread stoppable

Aperta

#863 aperta il 18 dic 2020

 (2 commenti) (0 reazioni) (0 assegnatari)C++ (8199 fork)batch import
enhancementhelp wanted

Metriche repository

Star
 (39.075 stelle)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

Hi,

Current version of LevelDB has detached background thread that can't be stopped and each environment calls std::abort() in destructor. This behavior prevents using of LevelDB in plugin dlls that can be started and stopped when main application still runs.

I think it is better to allow background thread to finish tasks in queue and then exit, when environment is being destroyed. That will make database loadable and unloadable.

Guida contributor