- Sort Score
- Result 10 results
- Languages All
Results 61 - 70 of 344 for lock2 (0.04 sec)
-
okhttp/src/main/kotlin/okhttp3/internal/connection/RealRoutePlanner.kt
import okhttp3.Route import okhttp3.internal.USER_AGENT import okhttp3.internal.canReuseConnectionFor import okhttp3.internal.closeQuietly import okhttp3.internal.concurrent.TaskRunner import okhttp3.internal.connection.Locks.withLock import okhttp3.internal.connection.RoutePlanner.Plan import okhttp3.internal.platform.Platform import okhttp3.internal.toHostHeader class RealRoutePlanner( private val taskRunner: TaskRunner,
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Apr 20 17:03:43 UTC 2024 - 12K bytes - Viewed (0) -
cmd/metacache-set.go
err := o.checkMetacacheState(ctx, rpc) if err != nil { return entries, fmt.Errorf("remote listing canceled: %w", err) } retries = 1 } // All operations are performed without locks, so we must be careful and allow for failures. // Read metadata associated with the object from a disk. if retries > 0 { for _, disk := range er.getDisks() { if disk == nil { continue }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Jul 12 16:23:16 UTC 2024 - 30.7K bytes - Viewed (0) -
internal/bucket/bandwidth/measurement.go
func (m *bucketMeasurement) updateExponentialMovingAverage(endTime time.Time) { // Calculate aggregate avg bandwidth and exp window avg m.lock.Lock() defer func() { m.startTime = endTime m.lock.Unlock() }() if m.startTime.IsZero() { return } if endTime.Before(m.startTime) { return } duration := endTime.Sub(m.startTime)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sat Jun 03 20:41:51 UTC 2023 - 2.9K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/concurrent/TaskRunner.kt
import java.util.concurrent.SynchronousQueue import java.util.concurrent.ThreadFactory import java.util.concurrent.ThreadPoolExecutor import java.util.concurrent.TimeUnit import java.util.concurrent.locks.Condition import java.util.concurrent.locks.ReentrantLock import java.util.logging.Logger import kotlin.concurrent.withLock import okhttp3.internal.addIfAbsent import okhttp3.internal.assertHeld
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Apr 29 00:33:04 UTC 2024 - 10.6K bytes - Viewed (0) -
internal/store/batch.go
func (b *Batch[I]) Add(item I) error { b.Lock() defer b.Unlock() if b.isFull() { if b.store == nil { return ErrBatchFull } // commit batch to store if err := b.commit(); err != nil { return err } } b.items = append(b.items, item) return nil } // Len returns the no of items in the batch func (b *Batch[_]) Len() int { b.Lock() defer b.Unlock() return len(b.items)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Sep 06 23:06:30 UTC 2024 - 2.9K bytes - Viewed (0) -
internal/ringbuffer/ring_buffer.go
// ErrIsNotEmpty is returned when the buffer is not empty and not blocking. ErrIsNotEmpty = errors.New("ringbuffer is not empty") // ErrAcquireLock is returned when the lock is not acquired on Try operations. ErrAcquireLock = errors.New("unable to acquire lock") // ErrWriteOnClosed is returned when write on a closed ringbuffer. ErrWriteOnClosed = errors.New("write on closed ringbuffer") )
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed May 15 00:11:04 UTC 2024 - 13.3K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/internal/concurrent/TaskFaker.kt
internal inline fun Any.assertThreadHoldsLock() { if (assertionsEnabled && !taskRunner.lock.isHeldByCurrentThread) { throw AssertionError("Thread ${Thread.currentThread().name} MUST hold lock on $this") } } @Suppress("NOTHING_TO_INLINE") internal inline fun Any.assertThreadDoesntHoldLock() { if (assertionsEnabled && taskRunner.lock.isHeldByCurrentThread) {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Apr 29 00:33:04 UTC 2024 - 12.6K bytes - Viewed (0) -
src/archive/zip/register.go
fw *flate.Writer } func (w *pooledFlateWriter) Write(p []byte) (n int, err error) { w.mu.Lock() defer w.mu.Unlock() if w.fw == nil { return 0, errors.New("Write after Close") } return w.fw.Write(p) } func (w *pooledFlateWriter) Close() error { w.mu.Lock() defer w.mu.Unlock() var err error if w.fw != nil { err = w.fw.Close() flateWriterPool.Put(w.fw) w.fw = nil
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Oct 13 18:36:46 UTC 2023 - 3.7K bytes - Viewed (0) -
internal/dsync/drwmutex_test.go
panic("Failed to acquire read lock") } // fmt.Println("1st read lock acquired, waiting...") drwm2 := NewDRWMutex(ds, "simplelock") ctx2, cancel2 := context.WithCancel(context.Background()) if !drwm2.GetRLock(ctx2, cancel2, id, source, Options{Timeout: time.Second}) { panic("Failed to acquire read lock") } // fmt.Println("2nd read lock acquired, waiting...") go func() {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sat Dec 24 03:49:07 UTC 2022 - 9.7K bytes - Viewed (0) -
cmd/site-replication-metrics.go
Endpoint string `json:"-"` // Secure is true if the replication target endpoint is secure Secure bool `json:"-"` } func (sr *SRStats) update(st replStat, dID string) { sr.lock.Lock() defer sr.lock.Unlock() srs, ok := sr.M[dID] if !ok { srs = &SRStatus{ XferRateLrg: newXferStats(), XferRateSml: newXferStats(), } } srs.Endpoint = st.Endpoint srs.Secure = st.Secure
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Feb 06 06:00:45 UTC 2024 - 8.2K bytes - Viewed (0)