Skip to content

Commit

Permalink
doc: clean up doc strings in fork_safety.rb
Browse files Browse the repository at this point in the history
[skip ci]
  • Loading branch information
flavorjones committed Nov 19, 2024
1 parent 48eb4fc commit f06bd4a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/sqlite3/fork_safety.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

require "weakref"

# based on Rails's active_support/fork_tracker.rb
module SQLite3
# based on Rails's active_support/fork_tracker.rb
module ForkSafety
module CoreExt
module CoreExt # :nodoc:
def _fork
pid = super
if pid == 0
Expand All @@ -20,17 +20,17 @@ def _fork
@suppress = false

class << self
def hook!
def hook! # :nodoc:
::Process.singleton_class.prepend(CoreExt)
end

def track(database)
def track(database) # :nodoc:
@mutex.synchronize do
@databases << WeakRef.new(database)
end
end

def discard
def discard # :nodoc:
warned = @suppress
@databases.each do |db|
next unless db.weakref_alive?
Expand Down

0 comments on commit f06bd4a

Please sign in to comment.