[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Lua-Sqlite3 timeout question, Help me to understand it.
- From: albert <albert_200200@...>
- Date: Thu, 14 Mar 2013 09:33:00 +0800
The code example is in this link:
http://www.nessie.de/mroth/lua-sqlite3/documentation.html#ref20
-- Open the database
db = sqlite3.open("filename")
-- Set 2 seconds busy timeout
db:set_busy_timeout(2 * 1000)
-- Use the database
db:exec(...)
The document said: "If you set a timeout, Sqlite3 will try as many
milliseconds as specified:"
In the code above, Does that mean when a exec to write the db, if the db
is locked, Sqlite3 will wait for 2 seconds, and then try to exec the
command again only once?
Do I understand it correctly? Thanks in advance.