search for: databaseseg

Displaying 1 result from an estimated 1 matches for "databaseseg".

Did you mean: databases
2009 Nov 07
1
Fwd: [PATCH (geoip)] use IO.pread from the io-extra lib if possible
...ION @record_length = STANDARD_RECORD_LENGTH @@ -530,11 +535,9 @@ class GeoIP private def read_city(pos, hostname = '''', ip = '''') - record = "" - @mutex.synchronize { - @file.seek(pos + (2*@record_length-1) * @databaseSegments[0]) - return nil unless record = @file.read(FULL_RECORD_LENGTH) - } + off = pos + (2*@record_length-1) * @databaseSegments[0] + record = atomic_read(FULL_RECORD_LENGTH, off) + return nil unless record && record.size == FULL_RECORD_LENGTH...