Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 167 for Unlock (0.25 sec)

  1. internal/dsync/dsync-client_test.go

    	}
    }
    
    func (restClient *ReconnectRESTClient) RLock(ctx context.Context, args LockArgs) (status bool, err error) {
    	return restClient.Call("/v1/rlock", args)
    }
    
    func (restClient *ReconnectRESTClient) Lock(ctx context.Context, args LockArgs) (status bool, err error) {
    	return restClient.Call("/v1/lock", args)
    }
    
    func (restClient *ReconnectRESTClient) RUnlock(ctx context.Context, args LockArgs) (status bool, err error) {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Jan 20 17:36:09 GMT 2022
    - 4.4K bytes
    - Viewed (0)
  2. src/archive/zip/register.go

    	fw *flate.Writer
    }
    
    func (w *pooledFlateWriter) Write(p []byte) (n int, err error) {
    	w.mu.Lock()
    	defer w.mu.Unlock()
    	if w.fw == nil {
    		return 0, errors.New("Write after Close")
    	}
    	return w.fw.Write(p)
    }
    
    func (w *pooledFlateWriter) Close() error {
    	w.mu.Lock()
    	defer w.mu.Unlock()
    	var err error
    	if w.fw != nil {
    		err = w.fw.Close()
    		flateWriterPool.Put(w.fw)
    		w.fw = nil
    	}
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Oct 13 18:36:46 GMT 2023
    - 3.7K bytes
    - Viewed (0)
  3. 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)
  4. internal/lock/lock_test.go

    		t.Fatal("Unexpected error", err)
    	}
    }
    
    // Tests lock and unlock semantics.
    func TestLockAndUnlock(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)
    		}
    	}()
    
    	// lock the file
    	l, err := LockedOpenFile(f.Name(), os.O_WRONLY, 0o600)
    	if err != 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)
  5. internal/bucket/bandwidth/monitor.go

    			return
    		}
    	}
    }
    
    func (m *Monitor) updateMovingAvg() {
    	m.mlock.Lock()
    	defer m.mlock.Unlock()
    	for _, bucketMeasurement := range m.bucketsMeasurement {
    		bucketMeasurement.updateExponentialMovingAverage(time.Now())
    	}
    }
    
    func (m *Monitor) init(opts BucketOptions) {
    	m.mlock.Lock()
    	defer m.mlock.Unlock()
    
    	_, ok := m.bucketsMeasurement[opts]
    	if !ok {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Feb 19 22:54:46 GMT 2024
    - 6K bytes
    - Viewed (0)
  6. tests/prepared_stmt_test.go

    	if !ok {
    		t.Fatalf("should assign PreparedStatement Manager back to database when using PrepareStmt mode")
    	}
    
    	pdb.Mux.Lock()
    	if len(pdb.Stmts) == 0 {
    		pdb.Mux.Unlock()
    		t.Fatalf("prepared stmt can not be empty")
    	}
    	pdb.Mux.Unlock()
    
    	pdb.Reset()
    	pdb.Mux.Lock()
    	defer pdb.Mux.Unlock()
    	if len(pdb.Stmts) != 0 {
    		t.Fatalf("prepared stmt should be empty")
    	}
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Thu Mar 21 07:55:43 GMT 2024
    - 4K bytes
    - Viewed (0)
  7. cmd/handler-api.go

    }
    
    func (t *apiConfig) odirectEnabled() bool {
    	t.mu.RLock()
    	defer t.mu.RUnlock()
    
    	return t.enableODirect
    }
    
    func (t *apiConfig) shouldGzipObjects() bool {
    	t.mu.RLock()
    	defer t.mu.RUnlock()
    
    	return t.gzipObjects
    }
    
    func (t *apiConfig) permitRootAccess() bool {
    	t.mu.RLock()
    	defer t.mu.RUnlock()
    
    	return t.rootAccess
    }
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Apr 08 09:22:27 GMT 2024
    - 10K bytes
    - Viewed (0)
  8. cmd/metacache-walk.go

    			return ctx.Err()
    		}
    		if opts.Limit > 0 && objsReturned >= opts.Limit {
    			return nil
    		}
    
    		if s.walkMu != nil {
    			s.walkMu.Lock()
    		}
    		entries, err := s.ListDir(ctx, "", opts.Bucket, current, -1)
    		if s.walkMu != nil {
    			s.walkMu.Unlock()
    		}
    		if err != nil {
    			// Folder could have gone away in-between
    			if err != errVolumeNotFound && err != errFileNotFound {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Apr 15 08:25:46 GMT 2024
    - 12.4K bytes
    - Viewed (0)
  9. cni/pkg/nodeagent/ztunnelserver.go

    }
    
    func (c *connMgr) addConn(conn *ZtunnelConnection) {
    	log.Debug("ztunnel connected")
    	c.mu.Lock()
    	defer c.mu.Unlock()
    	c.connectionSet[conn] = struct{}{}
    	c.latestConn = conn
    	ztunnelConnected.RecordInt(int64(len(c.connectionSet)))
    }
    
    func (c *connMgr) LatestConn() *ZtunnelConnection {
    	c.mu.Lock()
    	defer c.mu.Unlock()
    	return c.latestConn
    }
    
    func (c *connMgr) deleteConn(conn *ZtunnelConnection) {
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Fri Apr 12 21:47:31 GMT 2024
    - 12.4K bytes
    - Viewed (0)
  10. cmd/metacache-set.go

    					cancel()
    					exit = true
    				}
    			}
    			metaMu.Unlock()
    		}
    	}()
    
    	const retryDelay = 200 * time.Millisecond
    	const maxTries = 5
    
    	// Keep destination...
    	// Write results to disk.
    	bw := newMetacacheBlockWriter(entries, func(b *metacacheBlock) error {
    		// if the block is 0 bytes and its a first block skip it.
    		// skip only this for Transient caches.
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 18 04:42:11 GMT 2024
    - 30.4K bytes
    - Viewed (0)
Back to top