My goal is to make structure initialization of an *abstract* database atomic. Why abstract is because I am dealing with C++ wrapper I am gonna use for several differents storages. All these storages are accessed concurently, and if database file is missing it must be created and initialized. For that purpose I need to provide a guarantee that *on_create* callback will be called strictly once. Moreover I also must guarantee that if database was opened without invokation of *on_create* it means that structure of the database is initialized (by someone else). So for example if several processes/threads open same databse, one of them ( SQLITE_OPEN_EXCLUSIVE ) will execute *on_create*, but others must wait until it's finished.
Is there a way to achieve this by means of SQLite? O course I can make my own locking around database initialization but I just wondering if this, I think, common problem has standard ways of solving. Regards, Paul _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users