- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 139 for clocked (0.08 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/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-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) -
internal/grid/muxserver.go
default: atomic.StoreInt64(&m.LastPing, time.Now().Unix()) return pongMsg{} } } // disconnect will disconnect the mux. // m.recvMu must be locked when calling this function. func (m *muxServer) disconnect(msg string, locked bool) { if debugPrint { fmt.Println("Mux", m.ID, "disconnecting. Reason:", msg) } if msg != "" {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Jun 07 15:51:52 UTC 2024 - 9.7K bytes - Viewed (0) -
internal/dsync/lock-args.go
type LockArgs struct { // Unique ID of lock/unlock request. UID string // Resources contains single or multiple entries to be locked/unlocked. Resources []string // Owner represents unique ID for this instance, an owner who originally requested // the locked resource, useful primarily in figuring out stale locks. Owner string // Source contains the line number, function and file name of the code
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Jul 24 10:24:01 UTC 2024 - 1.8K bytes - Viewed (0) -
internal/grid/README.md
Returning any error will also cancel the stream remotely. CAREFUL: When utilizing two-way communication, it is important to ensure that the remote handler is not blocked on a send. If the remote handler is blocked on a send, and the client is trying to send without the remote receiving, the operation would become deadlocked if the channels are full. ### Typed handlers
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Jan 18 07:03:17 UTC 2024 - 9.4K bytes - Viewed (0)