Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 465 for atomic (0.17 sec)

  1. internal/s3select/simdj/reader.go

    	r      io.Reader
    }
    
    func (s *safeCloser) Read(p []byte) (n int, err error) {
    	if atomic.LoadUint32(&s.closed) == 1 {
    		return 0, io.EOF
    	}
    	n, err = s.r.Read(p)
    	if atomic.LoadUint32(&s.closed) == 1 {
    		return 0, io.EOF
    	}
    	return n, err
    }
    
    func (s *safeCloser) Close() error {
    	atomic.CompareAndSwapUint32(&s.closed, 0, 1)
    	return nil
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue May 30 17:02:22 GMT 2023
    - 4.9K bytes
    - Viewed (0)
  2. doc/go_mem.html

    twice.
    </p>
    
    <h3 id="atomic">Atomic Values</h3>
    
    <p>
    The APIs in the <a href="/pkg/sync/atomic/"><code>sync/atomic</code></a>
    package are collectively “atomic operations”
    that can be used to synchronize the execution of different goroutines.
    If the effect of an atomic operation <i>A</i> is observed by atomic operation <i>B</i>,
    then <i>A</i> is synchronized before <i>B</i>.
    HTML
    - Registered: Tue May 07 11:14:38 GMT 2024
    - Last Modified: Mon Mar 04 15:54:42 GMT 2024
    - 26.6K bytes
    - Viewed (0)
  3. cmd/perf-tests.go

    }
    
    func (n *netPerfRX) Connect() {
    	n.Lock()
    	defer n.Unlock()
    	n.activeConnections++
    	atomic.StoreUint64(&n.RX, 0)
    	n.lastToConnect = time.Now()
    }
    
    func (n *netPerfRX) Disconnect() {
    	n.Lock()
    	defer n.Unlock()
    	n.activeConnections--
    	if n.firstToDisconnect.IsZero() {
    		n.RXSample = atomic.LoadUint64(&n.RX)
    		n.firstToDisconnect = time.Now()
    	}
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Jan 28 18:04:17 GMT 2024
    - 11.3K bytes
    - Viewed (0)
  4. internal/s3select/progress.go

    func (r *countUpReader) Read(p []byte) (n int, err error) {
    	n, err = r.reader.Read(p)
    	atomic.AddInt64(&r.bytesRead, int64(n))
    	return n, err
    }
    
    func (r *countUpReader) BytesRead() int64 {
    	if r == nil {
    		return 0
    	}
    	return atomic.LoadInt64(&r.bytesRead)
    }
    
    func newCountUpReader(reader io.Reader) *countUpReader {
    	return &countUpReader{
    		reader: reader,
    	}
    }
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Oct 18 15:44:36 GMT 2021
    - 4.2K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/eventbus/outside/OutsideEventBusTest.java

     */
    
    package com.google.common.eventbus.outside;
    
    import com.google.common.eventbus.EventBus;
    import com.google.common.eventbus.Subscribe;
    import java.util.concurrent.atomic.AtomicInteger;
    import java.util.concurrent.atomic.AtomicReference;
    import junit.framework.TestCase;
    
    /**
     * Test cases for {@code EventBus} that must not be in the same package.
     *
     * @author Louis Wasserman
     */
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 1.8K bytes
    - Viewed (0)
  6. internal/dsync/drwmutex_test.go

    	for i := 0; i < numIterations; i++ {
    		if rwm.GetRLock(context.Background(), nil, id, source, Options{Timeout: time.Second}) {
    			n := atomic.AddInt32(activity, 1)
    			if n < 1 || n >= 10000 {
    				panic(fmt.Sprintf("wlock(%d)\n", n))
    			}
    			for i := 0; i < 100; i++ {
    			}
    			atomic.AddInt32(activity, -1)
    			rwm.RUnlock(context.Background())
    		}
    	}
    	cdone <- true
    }
    
    // Borrowed from rwmutex_test.go
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat Dec 24 03:49:07 GMT 2022
    - 9.7K bytes
    - Viewed (0)
  7. android/guava-testlib/test/com/google/common/testing/ArbitraryInstancesTest.java

    import java.util.concurrent.SynchronousQueue;
    import java.util.concurrent.ThreadFactory;
    import java.util.concurrent.TimeUnit;
    import java.util.concurrent.atomic.AtomicBoolean;
    import java.util.concurrent.atomic.AtomicInteger;
    import java.util.concurrent.atomic.AtomicLong;
    import java.util.concurrent.atomic.AtomicReference;
    import java.util.regex.MatchResult;
    import java.util.regex.Pattern;
    import junit.framework.TestCase;
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 21.7K bytes
    - Viewed (0)
  8. cmd/erasure-decode.go

    			n, err := rr.ReadAt(p.buf[bufIdx], p.offset)
    			if err != nil {
    				switch {
    				case errors.Is(err, errFileNotFound):
    					atomic.StoreInt32(&missingPartsHeal, 1)
    				case errors.Is(err, errFileCorrupt):
    					atomic.StoreInt32(&bitrotHeal, 1)
    				case errors.Is(err, errDiskNotFound):
    					atomic.AddInt32(&disksNotFound, 1)
    				}
    
    				// This will be communicated upstream.
    				p.orgReaders[bufIdx] = nil
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 19 16:44:59 GMT 2024
    - 9.4K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/util/concurrent/SupplementalMonitorTest.java

    import static org.junit.Assert.assertThrows;
    
    import com.google.common.util.concurrent.GeneratedMonitorTest.FlagGuard;
    import java.util.concurrent.atomic.AtomicBoolean;
    import java.util.concurrent.atomic.AtomicInteger;
    import java.util.concurrent.atomic.AtomicReference;
    import junit.framework.TestCase;
    
    /**
     * Supplemental tests for {@link Monitor}.
     *
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 4.9K bytes
    - Viewed (0)
  10. common-protos/k8s.io/api/certificates/v1beta1/generated.proto

      repeated CertificateSigningRequest items = 2;
    }
    
    // CertificateSigningRequestSpec contains the certificate request.
    message CertificateSigningRequestSpec {
      // Base64-encoded PKCS#10 CSR data
      // +listType=atomic
      optional bytes request = 1;
    
      // Requested signer for the request. It is a qualified name in the form:
      // `scope-hostname.io/name`.
      // If empty, it will be defaulted:
    Plain Text
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Mon Mar 11 18:43:24 GMT 2024
    - 6.7K bytes
    - Viewed (0)
Back to top