- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 399 for clocked (0.09 sec)
-
internal/lsync/lrwmutex_test.go
wl := NewLRWMutex() var rl sync.Locker wlocked := make(chan bool, 1) rlocked := make(chan bool, 1) rl = wl.DRLocker() n := 10 go func() { for i := 0; i < n; i++ { rl.Lock() rl.Lock() rlocked <- true wl.Lock() wlocked <- true } }() for i := 0; i < n; i++ { <-rlocked rl.Unlock() select { case <-wlocked: t.Fatal("RLocker() didn't read-lock it")
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Mar 05 04:57:35 UTC 2023 - 7.9K bytes - Viewed (0) -
internal/dsync/drwmutex_test.go
expected := true if locked != expected { t.Errorf("TestSimpleWriteLockAcquired(): \nexpected %#v\ngot %#v", expected, locked) } } func TestSimpleWriteLockTimedOut(t *testing.T) { locked := testSimpleWriteLock(t, testDrwMutexAcquireTimeout) expected := false if locked != expected { t.Errorf("TestSimpleWriteLockTimedOut(): \nexpected %#v\ngot %#v", expected, locked) } }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sat Dec 24 03:49:07 UTC 2022 - 9.7K bytes - Viewed (0) -
internal/lock/lock_test.go
return } locked <- struct{}{} if blerr = bl.Close(); blerr != nil { t.Error(blerr) return } }() select { case <-locked: t.Error("unexpected unblocking") case <-time.After(100 * time.Millisecond): } // unlock if err = dupl.Close(); err != nil { t.Fatal(err) } // the previously blocked routine should be unblocked select {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 19 18:05:16 UTC 2022 - 3.6K bytes - Viewed (0) -
internal/dsync/drwmutex.go
} // Granted - represents a structure of a granted lock. type Granted struct { index int lockUID string // Locked if set with UID string, unlocked if empty } func (g *Granted) isLocked() bool { return isLocked(g.lockUID) } func isLocked(uid string) bool { return len(uid) > 0 } // NewDRWMutex - initializes a new dsync RW mutex.
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/local-locker.go
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Jul 24 10:24:01 UTC 2024 - 10.7K bytes - Viewed (0) -
internal/lock/lock.go
// open file descriptor. package lock import ( "errors" "os" "sync" ) // ErrAlreadyLocked is returned if the underlying fd is already locked. var ErrAlreadyLocked = errors.New("file already locked") // RLockedFile represents a read locked file, implements a special // closer which only closes the associated *os.File when the ref count. // has reached zero, i.e when all the readers have given up their locks.
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
lm.ref = 1 lm.isWriteLock = true locked = true } } else { if !lm.isWriteLock { lm.ref++ locked = true } } return locked } const ( lockRetryInterval = 50 * time.Millisecond ) // lockLoop will acquire either a read or a write lock // // The call will block until the lock is granted using a built-in // timing randomized back-off algorithm to try again until successful
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Jan 02 17:15:06 UTC 2022 - 4.8K bytes - Viewed (0) -
internal/dsync/locker.go
// In that case, the resource may or may not be unlocked. RUnlock(ctx context.Context, args LockArgs) (bool, error) // Do write unlock for given LockArgs. It should return // * a boolean to indicate success/failure of the operation // * an error on failure of unlock request operation. // Canceling the context will abort the remote call. // In that case, the resource may or may not be unlocked.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Jan 18 20:44:38 UTC 2022 - 2.7K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/InterruptibleTask.java
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 17 02:42:09 UTC 2024 - 10.1K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/InterruptibleTaskTest.java
// after some period of time the runner thread should become blocked on the task because it is // waiting for the slow interrupting thread to complete Thread.interrupt awaitBlockedOnInstanceOf(runner, InterruptibleTask.Blocker.class); Blocker blocker = (Blocker) LockSupport.getBlocker(runner); Thread owner = blocker.getOwner(); assertThat(owner).isSameInstanceAs(interrupter);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 6.6K bytes - Viewed (0)