Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 20 for Gosched (0.18 sec)

  1. src/cmd/cgo/internal/test/cgo_thread_lock.go

    /*
    #include <unistd.h>
    #include <stdbool.h>
    #include <sys/syscall.h>
    void Gosched(void);
    static bool Ctid(void) {
    	long tid1 = syscall(SYS_gettid);
    	Gosched();
    	return tid1 == syscall(SYS_gettid);
    }
    */
    import "C"
    
    import (
    	"runtime"
    	"testing"
    	"time"
    )
    
    //export Gosched
    func Gosched() {
    	runtime.Gosched()
    }
    
    func init() {
    	testThreadLockFunc = testThreadLock
    }
    
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Thu May 18 16:55:07 GMT 2023
    - 939 bytes
    - Viewed (0)
  2. cmd/namespace-lock_test.go

    		}()
    
    		// lk4, blocks.
    		lk4ch := make(chan bool)
    		go func() {
    			lk4ch <- nsLk.lock(ctx, "volume", "path", "source", "opsID", false, 0)
    		}()
    		runtime.Gosched()
    
    		// unlock the manual lock
    		nsLk.lockMapMutex.Unlock()
    
    		// To trigger the race:
    		// 1) lk3 or lk4 need to advance and increment the ref on the existing resource,
    		//    successfully acquiring the lock.
    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)
  3. internal/dsync/dsync_test.go

    				m.Lock(id, source)
    				acc0 -= 100
    				acc1 += 100
    				m.Unlock(context.Background())
    			} else {
    				for i := 0; i < len(data); i += 4 {
    					data[i]++
    				}
    				// Elaborate way to say runtime.Gosched
    				// that does not put the goroutine onto global runq.
    				go func() {
    					c <- true
    				}()
    				<-c
    			}
    		}
    	})
    }
    
    func BenchmarkMutexSpin(b *testing.B) {
    	b.ResetTimer()
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sat Dec 24 03:49:07 GMT 2022
    - 11K bytes
    - Viewed (0)
  4. internal/grid/grid_test.go

    	return func() {
    		close(cc)
    	}
    }
    
    func assertNoActive(t *testing.T, c *Connection) {
    	t.Helper()
    	// Tiny bit racy for tests, but we try to play nice.
    	for i := 10; i >= 0; i-- {
    		runtime.Gosched()
    		stats := c.Stats()
    		if stats.IncomingStreams != 0 {
    			if i > 0 {
    				time.Sleep(100 * time.Millisecond)
    				continue
    			}
    			var found []uint64
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Feb 08 18:15:27 GMT 2024
    - 30.1K bytes
    - Viewed (0)
  5. cmd/xl-storage-disk-id-check.go

    			a.N = atomic.LoadInt64(&old.N)
    			e.mu.Lock()
    			e.lastMinuteLatency.addAll(t-1, a)
    			e.mu.Unlock()
    			acc = newAcc
    		} else {
    			// We may be able to grab the new accumulator by yielding.
    			runtime.Gosched()
    			acc = e.cached.Load()
    		}
    	}
    	atomic.AddInt64(&acc.N, 1)
    	atomic.AddInt64(&acc.Total, int64(value))
    	atomic.AddInt64(&acc.Size, sz)
    }
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 33K bytes
    - Viewed (0)
  6. apache-maven/src/assembly/shared/init

    CLASSWORLDS_CONF="$MAVEN_HOME/bin/m2.conf"
    
    # For Cygwin and MinGW, ensure paths are in Unix format before anything is touched
    if $cygwin || $mingw ; then
      [ -n "$JAVA_HOME" ] &&
        JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
    fi
    
    if [ -n "$JAVA_HOME" ] ; then
      if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
        # IBM's JDK on AIX uses strange locations for the executables
        JAVACMD="$JAVA_HOME/jre/sh/java"
      else
        JAVACMD="$JAVA_HOME/bin/java"
    
    Plain Text
    - Registered: Sun Apr 28 03:35:10 GMT 2024
    - Last Modified: Sat Mar 05 22:52:54 GMT 2022
    - 2.3K bytes
    - Viewed (0)
  7. .teamcity/mvnw

    # For Cygwin, ensure paths are in UNIX format before anything is touched
    if $cygwin ; then
      [ -n "$M2_HOME" ] &&
        M2_HOME=`cygpath --unix "$M2_HOME"`
      [ -n "$JAVA_HOME" ] &&
        JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
      [ -n "$CLASSPATH" ] &&
        CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
    fi
    
    # For Mingw, ensure paths are in UNIX format before anything is touched
    if $mingw ; then
      [ -n "$M2_HOME" ] &&
    Shell Script
    - Registered: Wed Apr 24 11:36:11 GMT 2024
    - Last Modified: Wed Feb 26 01:48:39 GMT 2020
    - 9.8K bytes
    - Viewed (0)
  8. tensorflow/c/env.h

                                                    TF_Status* status);
    
    // Obtains statistics for the given path. If status is TF_OK, *stats is
    // updated, otherwise it is not touched.
    TF_CAPI_EXPORT extern void TF_FileStat(const char* filename,
                                           TF_FileStatistics* stats,
                                           TF_Status* status);
    
    C
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Sat Jan 09 02:53:27 GMT 2021
    - 9.6K bytes
    - Viewed (0)
  9. internal/s3select/json/preader.go

    	input       chan *queueItem // input for workers
    	queue       chan *queueItem // output from workers in order
    	err         error           // global error state, only touched by Reader.Read
    	bufferPool  sync.Pool       // pool of []byte objects for input
    	kvDstPool   sync.Pool       // pool of []jstream.KV used for output
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sun Mar 05 04:57:35 GMT 2023
    - 6.4K bytes
    - Viewed (0)
  10. internal/s3select/csv/reader.go

    	input        chan *queueItem  // input for workers
    	queue        chan *queueItem  // output from workers in order
    	err          error            // global error state, only touched by Reader.Read
    	bufferPool   sync.Pool        // pool of []byte objects for input
    	csvDstPool   sync.Pool        // pool of [][]string used for output
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 8.9K bytes
    - Viewed (0)
Back to top