We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4b6d614 + c90b177 commit 81fb037Copy full SHA for 81fb037
lib/sqlite3/fork_safety.rb
@@ -17,6 +17,7 @@ def _fork
17
18
@databases = []
19
@mutex = Mutex.new
20
+ @suppress = false
21
22
class << self
23
def hook!
@@ -30,7 +31,7 @@ def track(database)
30
31
end
32
33
def discard
- warned = false
34
+ warned = @suppress
35
@databases.each do |db|
36
next unless db.weakref_alive?
37
@@ -49,6 +50,11 @@ def discard
49
50
51
@databases.clear
52
53
+
54
+ # Call to suppress the fork-related warnings.
55
+ def suppress_warnings!
56
+ @suppress = true
57
+ end
58
59
60
0 commit comments