- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of about 10,000 for ctan (0.04 sec)
-
test/fixedbugs/bug147.go
// run // Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main import "time" func main() { var count int c := make(chan byte) go func(c chan byte) { <-c count++ time.Sleep(1000000) count++ <-c }(c) c <- 1 c <- 2 if count != 2 { panic("synchronous send did not wait") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat Feb 18 21:15:42 UTC 2012 - 411 bytes - Viewed (0) -
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) -
pkg/test/framework/components/echo/util/traffic/generator.go
fillInDefaults(&cfg) return &generator{ Config: cfg, t: t, stop: make(chan struct{}), stopped: make(chan struct{}), } } var _ Generator = &generator{} type generator struct { Config t test.Failer result Result stop chan struct{} stopped chan struct{} } func (g *generator) Start() Generator { go func() { t := time.NewTimer(g.Interval) for {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Apr 12 22:50:35 UTC 2022 - 3.1K bytes - Viewed (0) -
src/go/internal/gccgoimporter/testdata/aliases.go
T1 []byte T2 struct { x int } T3 interface { m() T2 } T4 func(int, T0) chan T2 ) // basic aliases type ( Ai = int A0 = T0 A1 = T1 A2 = T2 A3 = T3 A4 = T4 A10 = [10]int A11 = []byte A12 = struct { x int } A13 = interface { m() A2 } A14 = func(int, A0) chan A2 ) // alias receiver types func (T0) m1() {} func (A0) m2() {}
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Sep 27 02:52:03 UTC 2018 - 624 bytes - Viewed (0) -
src/net/textproto/pipeline.go
mu sync.Mutex id uint wait map[uint]chan struct{} } // Start waits until it is time for the event numbered id to begin. // That is, except for the first event, it waits until End(id-1) has // been called. func (s *sequencer) Start(id uint) { s.mu.Lock() if s.id == id { s.mu.Unlock() return } c := make(chan struct{}) if s.wait == nil { s.wait = make(map[uint]chan struct{}) } s.wait[id] = c
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Apr 08 16:19:51 UTC 2020 - 3K bytes - Viewed (0) -
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) -
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) -
staging/src/k8s.io/apiserver/pkg/admission/configuration/configuration_manager_test.go
poller.failureThreshold = 0 stopCh := make(chan struct{}) defer close(stopCh) go poller.Run(stopCh) go func() { // The test might have false negative, but won't be flaky timer := time.NewTimer(2 * time.Second) defer timer.Stop() <-timer.C fakeGetSucceedLock.Lock() defer fakeGetSucceedLock.Unlock() fakeGetSucceed = true }() done := make(chan struct{}) go func(t *testing.T) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Nov 06 02:02:38 UTC 2017 - 2.4K bytes - Viewed (0) -
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) -
test/fixedbugs/bug243.go
}() var conn, _ = Dial("tcp", "", listen.Addr().Error()) _ = conn } // Simulated net interface to exercise bug // without involving a real network. type T chan int var global T func Listen(x, y string) (T, string) { global = make(chan int) return global, y } func (t T) Addr() error { return errors.New("stringer") } func (t T) Accept() (int, string) { return <-t, "" }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 02 13:43:18 UTC 2016 - 893 bytes - Viewed (0)