- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 523 for clock9 (0.2 sec)
-
internal/dsync/drwmutex.go
return dm.lockBlocking(ctx, cancel, id, source, isReadLock, opts) } // RLock holds a read lock on dm. // // If one or more read locks are already in use, it will grant another lock. // Otherwise the calling go routine blocks until the mutex is available. func (dm *DRWMutex) RLock(id, source string) { isReadLock := true dm.lockBlocking(context.Background(), nil, id, source, isReadLock, Options{ Timeout: drwMutexInfinite,
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 09 15:49:49 UTC 2024 - 20.4K bytes - Viewed (0) -
cmd/namespace-lock.go
return LockContext{ctx: newCtx, cancel: cancel}, nil } // Unlock - block until write lock is released. func (di *distLockInstance) Unlock(lc LockContext) { if lc.cancel != nil { lc.cancel() } di.rwMutex.Unlock(context.Background()) } // RLock - block until read lock is taken or timeout has occurred.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Sep 29 22:40:36 UTC 2024 - 9.2K bytes - Viewed (0) -
internal/lock/lock.go
// has reached zero, i.e when all the readers have given up their locks. type RLockedFile struct { *LockedFile mutex sync.Mutex refs int // Holds read lock refs. } // IsClosed - Check if the rlocked file is already closed. func (r *RLockedFile) IsClosed() bool { r.mutex.Lock() defer r.mutex.Unlock() return r.refs == 0 } // IncLockRef - is used by called to indicate lock refs. func (r *RLockedFile) IncLockRef() {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Jan 02 17:15:06 UTC 2022 - 2.5K bytes - Viewed (0) -
internal/lsync/lrwmutex.go
} // RLock holds a read lock on lm. // // If one or more read lock are already in use, it will grant another lock. // Otherwise the calling go routine blocks until the mutex is available. func (lm *LRWMutex) RLock() { const isWriteLock = false lm.lockLoop(context.Background(), lm.id, lm.source, 1<<63-1, isWriteLock) } // GetRLock tries to get a read lock on lm before the timeout occurs.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Jan 02 17:15:06 UTC 2022 - 4.8K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Stream.kt
outFinished: Boolean, inFinished: Boolean, headers: Headers?, ) { internal val lock: ReentrantLock = ReentrantLock() val condition: Condition = lock.newCondition() // Internal state is guarded by [lock]. No long-running or potentially blocking operations are // performed while the lock is held. /** The bytes consumed and acknowledged by the stream. */ val readBytes: WindowCounter = WindowCounter(id)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Apr 20 17:03:43 UTC 2024 - 23.2K bytes - Viewed (0) -
cmd/local-locker_test.go
rng := rand.New(rand.NewSource(0)) quorum := 0 // Numbers of unique locks for _, locks := range []int{100, 1000, 1e6} { if testing.Short() && locks > 100 { continue } t.Run(fmt.Sprintf("%d-locks", locks), func(t *testing.T) { // Number of readers per lock... for _, readers := range []int{1, 10, 100} { if locks > 1000 && readers > 1 { continue }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Jul 24 10:24:01 UTC 2024 - 11.9K bytes - Viewed (0) -
cmd/lock-rest-client_test.go
t.Fatalf("unexpected result. connection was online") } // Attempt all calls. _, err = lkClient.RLock(context.Background(), dsync.LockArgs{}) if err == nil { t.Fatal("Expected for Rlock to fail") } _, err = lkClient.Lock(context.Background(), dsync.LockArgs{}) if err == nil { t.Fatal("Expected for Lock to fail") } _, err = lkClient.RUnlock(context.Background(), dsync.LockArgs{}) if err == nil {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jul 29 18:10:04 UTC 2024 - 2K bytes - Viewed (0) -
cmd/lock-rest-server.go
dst.Code = dsync.RespErr dst.Err = err.Error() } return dst, nil } const ( // Lock maintenance interval. lockMaintenanceInterval = 1 * time.Minute // Lock validity duration lockValidityDuration = 1 * time.Minute ) // lockMaintenance loops over all locks and discards locks // that have not been refreshed for some time. func lockMaintenance(ctx context.Context) {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jul 29 18:10:04 UTC 2024 - 5.8K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/connection/Locks.kt
import okhttp3.internal.http2.Http2Stream import okhttp3.internal.http2.Http2Writer /** * Centralisation of central locks according to docs/contribute/concurrency.md */ internal object Locks { inline fun <T> Dispatcher.withLock(action: () -> T): T { contract { callsInPlace(action, InvocationKind.EXACTLY_ONCE) } return lock.withLock(action) } inline fun <T> RealConnection.withLock(action: () -> T): T {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Apr 20 17:03:43 UTC 2024 - 2.1K bytes - Viewed (0) -
internal/dsync/dsync-server_test.go
} } const WriteLock = -1 type lockServer struct { mutex sync.Mutex // Map of locks, with negative value indicating (exclusive) write lock // and positive values indicating number of read locks lockMap map[string]int64 // Refresh returns lock not found if set to true lockNotFound bool // Set to true if you want peers servers to do not respond responseDelay int64 }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jan 23 16:46:37 UTC 2023 - 8.3K bytes - Viewed (0)