Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 49 of 49 for lockOSThread (0.33 sec)

  1. src/runtime/stack_test.go

    		growStack(nil)
    		growDuration = time.Since(start)
    	}()
    	wg.Wait()
    	t.Log("first growStack took", growDuration)
    
    	// in locked goroutine
    	wg.Add(1)
    	go func() {
    		defer wg.Done()
    		LockOSThread()
    		growStack(nil)
    		UnlockOSThread()
    	}()
    	wg.Wait()
    
    	// in finalizer
    	var finalizerStart time.Time
    	var started atomic.Bool
    	var progress atomic.Uint32
    	wg.Add(1)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jun 14 00:03:57 UTC 2023
    - 23.1K bytes
    - Viewed (0)
  2. src/os/os_test.go

    			if i%2 == 1 {
    				// On Plan 9, after calling LockOSThread, the goroutines
    				// run on different processes which don't share the working
    				// directory. This used to be an issue because Go expects
    				// the working directory to be program-wide.
    				// See issue 9428.
    				runtime.LockOSThread()
    			}
    			select {
    			case <-done:
    				return
    			case <-hold:
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 83.1K bytes
    - Viewed (0)
  3. src/runtime/signal_unix.go

    	disableSigChan = make(chan uint32)
    	enableSigChan = make(chan uint32)
    	go func() {
    		// Signal masks are per-thread, so make sure this goroutine stays on one
    		// thread.
    		LockOSThread()
    		defer UnlockOSThread()
    		// The sigBlocked mask contains the signals not active for os/signal,
    		// initially all signals except the essential. When signal.Notify()/Stop is called,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 10 16:04:54 UTC 2024
    - 45K bytes
    - Viewed (0)
  4. src/os/os_windows_test.go

    			},
    		)
    	} else {
    		t.Log(`skipping "use_mklink_cmd" test, mklink does not supports directory symbolic links`)
    	}
    
    	// The rest of these test requires SeCreateSymbolicLinkPrivilege to be held.
    	runtime.LockOSThread()
    	defer runtime.UnlockOSThread()
    
    	err := windows.ImpersonateSelf(windows.SecurityImpersonation)
    	if err != nil {
    		t.Fatal(err)
    	}
    	defer windows.RevertToSelf()
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 41.8K bytes
    - Viewed (0)
  5. src/runtime/export_test.go

    	// will become invalid after a thread switch. This test
    	// checks that the bad caching doesn't happen.
    
    	ch := make(chan int)
    	go func(ch chan int) {
    		ch <- 5
    		LockOSThread()
    	}(ch)
    
    	g1 := getg()
    
    	// Block on a receive. This is likely to get us a thread
    	// switch. If we yield to the sender goroutine, it will
    	// lock the thread, forcing us to resume on a different
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:50:53 UTC 2024
    - 46.1K bytes
    - Viewed (0)
  6. src/os/exec/exec.go

    // type [*ExitError]. Other error types may be returned for other situations.
    //
    // If the calling goroutine has locked the operating system thread
    // with [runtime.LockOSThread] and modified any inheritable OS-level
    // thread state (for example, Linux or Plan 9 name spaces), the new
    // process will inherit the caller's thread state.
    func (c *Cmd) Run() error {
    	if err := c.Start(); err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 20:13:53 UTC 2024
    - 41.4K bytes
    - Viewed (0)
  7. src/cmd/cgo/internal/test/callback.go

    	for i := 0; i < 100000; i++ {
    		testCallbackPanic(t)
    	}
    }
    
    func testCallbackPanicLocked(t *testing.T) {
    	runtime.LockOSThread()
    	defer runtime.UnlockOSThread()
    
    	if !lockedOSThread() {
    		t.Fatal("runtime.LockOSThread didn't")
    	}
    	defer func() {
    		s := recover()
    		if s == nil {
    			t.Fatal("did not panic")
    		}
    		if s.(string) != "callback panic" {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 12:00:02 UTC 2023
    - 111.5K bytes
    - Viewed (0)
  8. src/syscall/syscall_windows.go

    // the index of the last subkey (obtainable from RegQueryInfoKey),
    // decrementing until index 0 is enumerated.
    //
    // Successive calls to this API must happen on the same OS thread,
    // so call [runtime.LockOSThread] before calling this function.
    func RegEnumKeyEx(key Handle, index uint32, name *uint16, nameLen *uint32, reserved *uint32, class *uint16, classLen *uint32, lastWriteTime *Filetime) (regerrno error) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 21 11:49:46 UTC 2024
    - 52.7K bytes
    - Viewed (0)
  9. src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go

    		{"GOMAXPROCS", Func, 0},
    		{"GOOS", Const, 0},
    		{"GOROOT", Func, 0},
    		{"Goexit", Func, 0},
    		{"GoroutineProfile", Func, 0},
    		{"Gosched", Func, 0},
    		{"KeepAlive", Func, 7},
    		{"LockOSThread", Func, 0},
    		{"MemProfile", Func, 0},
    		{"MemProfileRate", Var, 0},
    		{"MemProfileRecord", Type, 0},
    		{"MemProfileRecord.AllocBytes", Field, 0},
    		{"MemProfileRecord.AllocObjects", Field, 0},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 534.2K bytes
    - Viewed (0)
Back to top