Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 8,530 for ctan (0.05 sec)

  1. test/fixedbugs/issue57823.go

    	s := make([]byte, 100)
    	s[0] = 1
    	one := unsafe.SliceData(s)
    
    	done := make(chan struct{})
    	runtime.SetFinalizer(one, func(*byte) { close(done) })
    
    	h := g(one)
    
    	if wait(done) {
    		panic("GC'd early")
    	}
    
    	if *h != 1 {
    		panic("lost one")
    	}
    
    	if !wait(done) {
    		panic("never GC'd")
    	}
    }
    
    var strDone = make(chan struct{})
    
    //go:noinline
    func str(x, y string) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 18 01:27:21 UTC 2023
    - 1.1K bytes
    - Viewed (0)
  2. pkg/kubelet/nodeshutdown/systemd/inhibit_linux_test.go

    	return nil
    }
    
    func (obj *fakeDBusObject) Go(method string, flags dbus.Flags, ch chan *dbus.Call, args ...interface{}) *dbus.Call {
    	return nil
    }
    
    func (obj *fakeDBusObject) GoWithContext(ctx context.Context, method string, flags dbus.Flags, ch chan *dbus.Call, args ...interface{}) *dbus.Call {
    	return nil
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 29 19:50:06 UTC 2023
    - 4.4K bytes
    - Viewed (0)
  3. pkg/queue/delay_test.go

    		}
    	}
    }
    
    func TestDelayQueueOrdering(t *testing.T) {
    	dq := NewDelayed(DelayQueueWorkers(2))
    	stop := make(chan struct{})
    	defer close(stop)
    	go dq.Run(stop)
    
    	mu := sync.Mutex{}
    	var t0, t1, t2 time.Time
    
    	done := make(chan struct{})
    	dq.PushDelayed(func() error {
    		mu.Lock()
    		defer mu.Unlock()
    		defer close(done)
    		t2 = time.Now()
    		return nil
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jul 20 06:27:31 UTC 2023
    - 4.3K bytes
    - Viewed (0)
  4. pkg/kube/informerfactory/factory.go

    	start    func(stopCh <-chan struct{})
    }
    
    func (s StartableInformer) Start(stopCh <-chan struct{}) {
    	s.start(stopCh)
    }
    
    // InformerFactory provides access to a shared informer factory
    type InformerFactory interface {
    	// Start initializes all requested informers. They are handled in goroutines
    	// which run until the stop channel gets closed.
    	Start(stopCh <-chan struct{})
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 23 17:08:31 UTC 2023
    - 7.9K bytes
    - Viewed (0)
  5. src/cmd/cgo/internal/testplugin/testdata/issue24351/main.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package main
    
    import "plugin"
    
    func main() {
    	p, err := plugin.Open("issue24351.so")
    	if err != nil {
    		panic(err)
    	}
    	f, err := p.Lookup("B")
    	if err != nil {
    		panic(err)
    	}
    	c := make(chan bool)
    	f.(func(chan bool))(c)
    	<-c
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 389 bytes
    - Viewed (0)
  6. pkg/client/tests/portfoward_test.go

    			stopChan := make(chan struct{}, 1)
    			readyChan := make(chan struct{})
    
    			pf, err := New(dialer, test.ports, stopChan, readyChan, os.Stdout, os.Stderr)
    			if err != nil {
    				t.Fatalf("%s: unexpected error calling New: %v", testName, err)
    			}
    
    			doneChan := make(chan error)
    			go func() {
    				doneChan <- pf.ForwardPorts()
    			}()
    			<-pf.Ready
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jun 05 06:08:18 UTC 2023
    - 7.1K bytes
    - Viewed (0)
  7. src/context/afterfunc_test.go

    	return &afterFuncContext{}
    }
    
    func (c *afterFuncContext) Deadline() (time.Time, bool) {
    	return time.Time{}, false
    }
    
    func (c *afterFuncContext) Done() <-chan struct{} {
    	c.mu.Lock()
    	defer c.mu.Unlock()
    	if c.done == nil {
    		c.done = make(chan struct{})
    	}
    	return c.done
    }
    
    func (c *afterFuncContext) Err() error {
    	c.mu.Lock()
    	defer c.mu.Unlock()
    	return c.err
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 18 16:58:52 UTC 2023
    - 3.4K bytes
    - Viewed (0)
  8. cmd/service.go

    	globalServiceFreezeMu.Lock()
    	// Close when we reach 0
    	globalServiceFreezeCnt--
    	if globalServiceFreezeCnt <= 0 {
    		// Set to a nil channel.
    		var _ch chan struct{}
    		if val := globalServiceFreeze.Swap(_ch); val != nil {
    			if ch, ok := val.(chan struct{}); ok && ch != nil {
    				// Close previous non-nil channel.
    				xioutil.SafeClose(ch)
    			}
    		}
    		globalServiceFreezeCnt = 0 // Don't risk going negative.
    	}
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed Feb 28 07:02:14 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  9. pilot/pkg/config/memory/monitor_test.go

    )
    
    func TestMonitorLifecycle(t *testing.T) {
    	// Regression test to ensure no race conditions during monitor shutdown
    	store := memory.Make(collections.Mocks)
    	m := memory.NewMonitor(store)
    	stop := make(chan struct{})
    	go m.Run(stop)
    	m.ScheduleProcessEvent(memory.ConfigEvent{})
    	close(stop)
    	m.ScheduleProcessEvent(memory.ConfigEvent{})
    }
    
    func TestEventConsistency(t *testing.T) {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Mar 01 01:34:15 UTC 2023
    - 2.4K bytes
    - Viewed (0)
  10. test/fixedbugs/issue38093.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // Test race condition between timers and wasm calls that led to memory corruption.
    
    package main
    
    import (
    	"os"
    	"syscall/js"
    	"time"
    )
    
    func main() {
    	ch1 := make(chan struct{})
    
    	go func() {
    		for {
    			time.Sleep(5 * time.Millisecond)
    			ch1 <- struct{}{}
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:25 UTC 2023
    - 861 bytes
    - Viewed (0)
Back to top