Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 548 for locked (0.26 sec)

  1. internal/dsync/locked_rand.go

    func (r *lockedRandSource) Int63() (n int64) {
    	r.lk.Lock()
    	n = r.src.Int63()
    	r.lk.Unlock()
    	return
    }
    
    // Seed uses the provided seed value to initialize the generator to a
    // deterministic state.
    func (r *lockedRandSource) Seed(seed int64) {
    	r.lk.Lock()
    	r.src.Seed(seed)
    	r.lk.Unlock()
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Oct 18 15:39:59 GMT 2021
    - 1.3K bytes
    - Viewed (0)
  2. internal/lock/lock.go

    // Package lock - implements filesystem locking wrappers around an
    // 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
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sun Jan 02 17:15:06 GMT 2022
    - 2.5K bytes
    - Viewed (0)
  3. 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")
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sun Mar 05 04:57:35 GMT 2023
    - 7.9K bytes
    - Viewed (0)
  4. internal/dsync/drwmutex.go

    			if sendRelease(ctx, ds, restClnts[lockID], owner, (*locks)[lockID], isReadLock, names...) {
    				(*locks)[lockID] = ""
    			}
    		}(lockID)
    	}
    	wg.Wait()
    
    	// Return true if releaseAll was successful, otherwise we return 'false'
    	// to indicate we haven't sufficiently unlocked lockers to avoid deadlocks.
    	//
    	// Caller may use this as an indication to call again.
    	return !checkFailedUnlocks(*locks, tolerance)
    }
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 19.7K bytes
    - Viewed (0)
  5. internal/lock/lock_test.go

    	}
    
    	// unlock the file
    	if err = l.Close(); err != nil {
    		t.Fatal(err)
    	}
    
    	// try lock the unlocked file
    	dupl, err := LockedOpenFile(f.Name(), os.O_WRONLY|os.O_CREATE, 0o600)
    	if err != nil {
    		t.Errorf("err = %v, want %v", err, nil)
    	}
    
    	// blocking on locked file
    	locked := make(chan struct{}, 1)
    	go func() {
    		bl, blerr := LockedOpenFile(f.Name(), os.O_WRONLY, 0o600)
    		if blerr != nil {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Sep 19 18:05:16 GMT 2022
    - 3.6K bytes
    - Viewed (0)
  6. internal/lsync/lrwmutex.go

    	const isWriteLock = false
    	return lm.lockLoop(ctx, id, source, timeout, isWriteLock)
    }
    
    func (lm *LRWMutex) lock(id, source string, isWriteLock bool) (locked bool) {
    	lm.mu.Lock()
    	defer lm.mu.Unlock()
    
    	lm.id = id
    	lm.source = source
    	if isWriteLock {
    		if lm.ref == 0 && !lm.isWriteLock {
    			lm.ref = 1
    			lm.isWriteLock = true
    			locked = true
    		}
    	} else {
    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)
  7. internal/dsync/drwmutex_test.go

    	}
    	// fmt.Println("Write lock failed due to timeout")
    	return
    }
    
    func TestSimpleWriteLockAcquired(t *testing.T) {
    	locked := testSimpleWriteLock(t, 10*testDrwMutexAcquireTimeout)
    
    	expected := true
    	if locked != expected {
    		t.Errorf("TestSimpleWriteLockAcquired(): \nexpected %#v\ngot      %#v", expected, locked)
    	}
    }
    
    func TestSimpleWriteLockTimedOut(t *testing.T) {
    	locked := testSimpleWriteLock(t, testDrwMutexAcquireTimeout)
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sat Dec 24 03:49:07 GMT 2022
    - 9.7K bytes
    - Viewed (0)
  8. cmd/namespace-lock.go

    	} else {
    		locked = nsLk.GetLock(ctx, opsID, lockSource, timeout)
    	}
    
    	if !locked { // We failed to get the lock
    		// Decrement ref count since we failed to get the lock
    		n.lockMapMutex.Lock()
    		n.lockMap[resource].ref--
    		if n.lockMap[resource].ref < 0 {
    			logger.CriticalIf(GlobalContext, errors.New("resource reference count was lower than 0"))
    		}
    		if n.lockMap[resource].ref == 0 {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Jun 05 23:56:35 GMT 2023
    - 9.2K bytes
    - Viewed (0)
  9. src/packaging/deb/init.d/fess

    #FESS_HEAP_NEWSIZE=
    
    # max direct memory
    #FESS_DIRECT_SIZE=
    
    # Additional Java OPTS
    #FESS_JAVA_OPTS=
    
    # Maximum number of open files
    MAX_OPEN_FILES=65535
    
    # Maximum amount of locked memory
    #MAX_LOCKED_MEMORY=
    
    # Fess log directory
    LOG_DIR=${packaging.fess.log.dir}
    
    # Fess data directory
    DATA_DIR=${packaging.fess.var.dir}
    
    # Fess configuration directory
    CONF_DIR=${packaging.fess.conf.dir}
    
    Shell Script
    - Registered: Mon Apr 22 08:04:10 GMT 2024
    - Last Modified: Sun Jan 15 06:32:15 GMT 2023
    - 5.8K bytes
    - Viewed (0)
  10. tensorflow/c/experimental/filesystem/plugins/gcs/ram_file_block_cache.cc

            break;
          }
          // We need to make a copy of the filename here, since it could otherwise
          // be used within RemoveFile_Locked after `it` is deleted.
          RemoveFile_Locked(std::string(it->first.first));
        }
      }
    }
    
    void RamFileBlockCache::Flush() {
      absl::MutexLock lock(&mu_);
      block_map_.clear();
      lru_list_.clear();
      lra_list_.clear();
      cache_size_ = 0;
    }
    
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Thu Jul 16 01:39:09 GMT 2020
    - 11.1K bytes
    - Viewed (0)
Back to top