symisc / unqlite

An Embedded NoSQL, Transactional Database Engine
https://unqlite.symisc.net
Other
2.11k stars 164 forks source link

Question about "unqlite_journal" #73

Closed xiaoch05 closed 6 years ago

xiaoch05 commented 6 years ago

I install unqlite using "pip install unqlite" command. But such codes generate a file named "test.db_unqlite_journal" and data cannot be written into the file "test.db". If the line 'timer.start()' is deleted, then it works well. Cannot unqlite be used in multithread environment?

`from threading import Thread from unqlite import UnQLite import time

class Timer(Thread): def run(self): while True: time.sleep(1)

db = UnQLite("test.db") users = db.collection("users") users.create() users.store({'name':'Tom', 'age':23})

timer = Timer() timer.start()

time.sleep(1000)`