Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 629 for CBlock (0.21 sec)

  1. internal/lsync/lrwmutex.go

    			return false
    		default:
    			if lm.lock(id, source, isWriteLock) {
    				return true
    			}
    			time.Sleep(time.Duration(r.Float64() * float64(lockRetryInterval)))
    		}
    	}
    }
    
    // Unlock unlocks the write lock.
    //
    // It is a run-time error if lm is not locked on entry to Unlock.
    func (lm *LRWMutex) Unlock() {
    	isWriteLock := true
    	success := lm.unlock(isWriteLock)
    	if !success {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sun Jan 02 17:15:06 GMT 2022
    - 4.8K bytes
    - Viewed (0)
  2. 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 {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Nov 21 01:09:35 GMT 2023
    - 2K bytes
    - Viewed (0)
  3. internal/lock/lock_windows.go

    		}
    	}
    
    	return &LockedFile{File: f}, nil
    }
    
    // TryLockedOpenFile - tries a new write lock, functionality
    // it is similar to LockedOpenFile with with syscall.LOCK_EX
    // mode but along with syscall.LOCK_NB such that the function
    // doesn't wait forever but instead returns if it cannot
    // acquire a write lock.
    func TryLockedOpenFile(path string, flag int, perm os.FileMode) (*LockedFile, error) {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Wed Oct 18 18:08:15 GMT 2023
    - 7.9K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/util/concurrent/Monitor.java

        }
        final ReentrantLock lock = this.lock;
        lock.lock();
    
        boolean satisfied = false;
        try {
          return satisfied = guard.isSatisfied();
        } finally {
          if (!satisfied) {
            lock.unlock();
          }
        }
      }
    
      /**
       * Enters this monitor if the guard is satisfied. Blocks at most the given time acquiring the
       * lock, but does not wait for the guard to be satisfied.
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Dec 04 18:22:01 GMT 2023
    - 38.6K bytes
    - Viewed (0)
  5. cmd/handler-api.go

    		globalHTTPStats.incS3RequestsIncoming()
    
    		if r.Header.Get(globalObjectPerfUserMetadata) == "" {
    			if val := globalServiceFreeze.Load(); val != nil {
    				if unlock, ok := val.(chan struct{}); ok && unlock != nil {
    					// Wait until unfrozen.
    					select {
    					case <-unlock:
    					case <-r.Context().Done():
    						// if client canceled we don't need to wait here forever.
    						return
    					}
    				}
    			}
    		}
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Apr 08 09:22:27 GMT 2024
    - 10K bytes
    - Viewed (0)
  6. kotlin-js-store/yarn.lock

    Yuri Schimke <******@****.***> 1690028931 +0100
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Jul 22 12:28:51 GMT 2023
    - 87.4K bytes
    - Viewed (0)
  7. cmd/erasure-server-pool-rebalance.go

    			ok = true
    		}
    	}
    	if ok {
    		lock := z.serverPools[0].NewNSLock(minioMetaBucket, rebalMetaName)
    		lkCtx, err := lock.GetLock(ctx, globalOperationTimeout)
    		if err != nil {
    			rebalanceLogIf(ctx, fmt.Errorf("failed to acquire write lock on %s/%s: %w", minioMetaBucket, rebalMetaName, err))
    			return err
    		}
    		defer lock.Unlock(lkCtx)
    
    		ctx = lkCtx.Context()
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Apr 26 19:29:28 GMT 2024
    - 27.2K bytes
    - Viewed (0)
  8. internal/s3select/json/reader.go

    	// This ensures that Close will block until Read has completed.
    	// This allows another goroutine to close the reader.
    	pr.mu.Lock()
    	defer pr.mu.Unlock()
    	if pr.rc == nil {
    		return 0, io.EOF
    	}
    	return pr.rc.Read(p)
    }
    
    func (pr *syncReadCloser) Close() error {
    	pr.mu.Lock()
    	defer pr.mu.Unlock()
    	if pr.rc != nil {
    		err := pr.rc.Close()
    		pr.rc = nil
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Mar 24 03:58:53 GMT 2022
    - 3K bytes
    - Viewed (0)
  9. internal/pubsub/pubsub.go

    	}
    	ps.Lock()
    	defer ps.Unlock()
    
    	sub := &Sub[T]{ch: subCh, types: Mask(mask.Mask()), filter: filter}
    	ps.subs = append(ps.subs, sub)
    
    	// We hold a lock, so we are safe to update
    	combined := Mask(atomic.LoadUint64(&ps.types))
    	combined.Merge(Mask(mask.Mask()))
    	atomic.StoreUint64(&ps.types, uint64(combined))
    
    	go func() {
    		<-doneCh
    
    		ps.Lock()
    		defer ps.Unlock()
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Feb 06 16:57:30 GMT 2024
    - 5.2K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/util/concurrent/StripedTest.java

            .add(new Striped.SmallLazyStriped<ReadWriteLock>(50, READ_WRITE_LOCK_SUPPLIER))
            .add(new Striped.SmallLazyStriped<ReadWriteLock>(64, READ_WRITE_LOCK_SUPPLIER))
            .add(new Striped.LargeLazyStriped<ReadWriteLock>(50, READ_WRITE_LOCK_SUPPLIER))
            .add(new Striped.LargeLazyStriped<ReadWriteLock>(64, READ_WRITE_LOCK_SUPPLIER))
            .add(new Striped.SmallLazyStriped<Lock>(50, LOCK_SUPPLER))
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 09 22:57:07 GMT 2022
    - 8.4K bytes
    - Viewed (0)
Back to top