Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for ingr (0.04 sec)

  1. src/runtime/proc.go

    func lockextra(nilokay bool) *m {
    	const locked = 1
    
    	incr := false
    	for {
    		old := extraM.Load()
    		if old == locked {
    			osyield_no_g()
    			continue
    		}
    		if old == 0 && !nilokay {
    			if !incr {
    				// Add 1 to the number of threads
    				// waiting for an M.
    				// This is cleared by newextram.
    				extraMWaiters.Add(1)
    				incr = true
    			}
    			usleep_no_g(1)
    			continue
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 207.5K bytes
    - Viewed (0)
  2. src/reflect/all_test.go

    	}
    }
    
    func TestMakeFuncInterface(t *testing.T) {
    	fn := func(i int) int { return i }
    	incr := func(in []Value) []Value {
    		return []Value{ValueOf(int(in[0].Int() + 1))}
    	}
    	fv := MakeFunc(TypeOf(fn), incr)
    	ValueOf(&fn).Elem().Set(fv)
    	if r := fn(2); r != 3 {
    		t.Errorf("Call returned %d, want 3", r)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 218.8K bytes
    - Viewed (0)
Back to top