Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 274 for cock (0.17 sec)

  1. internal/lock/lock.go

    	*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() {
    	r.mutex.Lock()
    	r.refs++
    	r.mutex.Unlock()
    }
    
    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)
  2. .github/workflows/lock.yml

    name: 'Lock Threads'
    
    on:
      schedule:
        - cron: '0 0 * * *'
      workflow_dispatch:
    
    permissions:
      issues: write
    
    concurrency:
      group: lock
    
    jobs:
      action:
        runs-on: ubuntu-latest
        steps:
          - uses: dessant/lock-threads@v3
            with:
              github-token: ${{ github.token }}
              issue-inactive-days: '365'
              exclude-any-issue-labels: 'do-not-close'
    Others
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sun Jan 30 03:27:43 GMT 2022
    - 447 bytes
    - Viewed (0)
  3. cmd/namespace-lock.go

    	*lsync.LRWMutex
    }
    
    // nsLockMap - namespace lock map, provides primitives to Lock,
    // Unlock, RLock and RUnlock.
    type nsLockMap struct {
    	// Indicates if namespace is part of a distributed setup.
    	isDistErasure bool
    	lockMap       map[string]*nsLock
    	lockMapMutex  sync.Mutex
    }
    
    // Lock the namespace resource.
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Jun 05 23:56:35 GMT 2023
    - 9.2K bytes
    - Viewed (0)
  4. internal/lock/lock_nix.go

    }
    
    // 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) {
    	return lockedOpenFile(path, flag, perm, syscall.LOCK_NB)
    }
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Aug 19 01:35:22 GMT 2021
    - 2.8K bytes
    - Viewed (0)
  5. internal/lock/lock_solaris.go

    		}
    	}
    
    	return &LockedFile{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: Sun Jan 02 17:15:06 GMT 2022
    - 2.8K bytes
    - Viewed (0)
  6. cmd/shared-lock.go

    		for {
    			select {
    			case <-ctx.Done():
    				return
    			case <-lkctx.Context().Done():
    				// The context of the lock is canceled, this can happen
    				// if one lock lost quorum due to cluster instability
    				// in that case, try to lock again.
    				break keepLock
    			case ld.lockContext <- lkctx:
    				// Send the lock context to anyone asking for it
    			}
    		}
    	}
    }
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Feb 13 09:26:38 GMT 2023
    - 2.3K bytes
    - Viewed (0)
  7. internal/lock/lock_test.go

    // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    package lock
    
    import (
    	"os"
    	"testing"
    	"time"
    )
    
    // Test lock fails.
    func TestLockFail(t *testing.T) {
    	f, err := os.CreateTemp("", "lock")
    	if err != nil {
    		t.Fatal(err)
    	}
    	f.Close()
    	defer func() {
    		err = os.Remove(f.Name())
    		if err != nil {
    			t.Fatal(err)
    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)
  8. cmd/namespace-lock_test.go

    		// lk1; ref=1
    		if !nsLk.lock(ctx, "volume", "path", "source", "opsID", false, time.Second) {
    			t.Fatal("failed to acquire lock")
    		}
    
    		// lk2
    		lk2ch := make(chan struct{})
    		go func() {
    			defer close(lk2ch)
    			nsLk.lock(ctx, "volume", "path", "source", "opsID", false, 1*time.Millisecond)
    		}()
    		time.Sleep(1 * time.Millisecond) // wait for goroutine to advance; ref=2
    
    		// Unlock the 1st lock; ref=1 after this line
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Apr 23 18:58:53 GMT 2021
    - 3.1K bytes
    - Viewed (0)
  9. internal/dsync/lock-args.go

    // LockArgs is minimal required values for any dsync compatible lock operation.
    type LockArgs struct {
    	// Unique ID of lock/unlock request.
    	UID string
    
    	// Resources contains single or multiple entries to be locked/unlocked.
    	Resources []string
    
    	// Source contains the line number, function and file name of the code
    	// on the client node that requested the lock.
    	Source string
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Jan 18 04:34:26 GMT 2024
    - 1.7K bytes
    - Viewed (0)
  10. 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)
Back to top