Skip to content

Commit 17c9db8

Browse files
committed
Update database.rb
1 parent 6ef4db2 commit 17c9db8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/sqlite3/database.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -697,13 +697,12 @@ def readonly?
697697
# while SQLite sleeps and retries.
698698
def busy_handler_timeout=( milliseconds )
699699
timeout_seconds = milliseconds.fdiv(1000)
700-
retry_interval = 0.001 # 1 millisecond
701700
timeout_deadline = Process.clock_gettime(Process::CLOCK_MONOTONIC) + timeout_seconds
702701

703702
busy_handler do |count|
704703
next false if Process.clock_gettime(Process::CLOCK_MONOTONIC) > timeout_deadline
705704

706-
sleep(retry_interval)
705+
sleep(0.001)
707706
end
708707
end
709708

0 commit comments

Comments
 (0)