- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 609 for chan (0.03 sec)
-
internal/pubsub/pubsub_test.go
t.Fatalf("want %d subscribers, got %d", want, got) } } func TestSubscribeExceedingLimit(t *testing.T) { ps := New[Maskable, Maskable](2) ch1 := make(chan Maskable, 1) ch2 := make(chan Maskable, 1) ch3 := make(chan Maskable, 1) doneCh := make(chan struct{}) defer close(doneCh) if err := ps.Subscribe(MaskAll, ch1, doneCh, nil); err != nil { t.Fatalf("unexpected error: %v", err) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Aug 14 17:11:51 UTC 2024 - 5.8K bytes - Viewed (0) -
internal/grid/muxserver.go
// Data inbound to the handler var handlerIn chan []byte if inboundCap > 0 { m.inbound = make(chan []byte, inboundCap) handlerIn = make(chan []byte, 1) go func(inbound chan []byte) { wg.Wait() defer xioutil.SafeClose(handlerIn) m.handleInbound(c, inbound, handlerIn) }(m.inbound) } // Fill outbound block. // Each token represents a message that can be sent to the client without blocking.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Jun 07 15:51:52 UTC 2024 - 9.7K bytes - Viewed (0) -
cni/pkg/util/pluginutil.go
"encoding/json" "fmt" "os" "github.com/fsnotify/fsnotify" "istio.io/istio/pkg/file" "istio.io/istio/pkg/log" ) type Watcher struct { watcher *fsnotify.Watcher Events chan struct{} Errors chan error } // Waits until a file is modified (returns nil), the context is cancelled (returns context error), or returns error func (w *Watcher) Wait(ctx context.Context) error { select { case <-w.Events:
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Fri Jan 26 20:34:28 UTC 2024 - 3.6K bytes - Viewed (0) -
internal/store/store.go
key.Name = strings.TrimSuffix(key.Name, key.Extension) } return } // replayItems - Reads the items from the store and replays. func replayItems[I any](store Store[I], doneCh <-chan struct{}, log logger, id string) <-chan Key { keyCh := make(chan Key) go func() { defer xioutil.SafeClose(keyCh) retryTicker := time.NewTicker(retryInterval) defer retryTicker.Stop() for {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Sep 06 23:06:30 UTC 2024 - 4.2K bytes - Viewed (0) -
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 close chan struct{} // used for shutting down the splitter before end of stream
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 23 19:35:41 UTC 2024 - 6.5K bytes - Viewed (0) -
misc/cgo/gmp/fib.go
// license that can be found in the LICENSE file. //go:build ignore // Compute Fibonacci numbers with two goroutines // that pass integers back and forth. No actual // concurrency, just threads and synchronization // and foreign code on multiple pthreads. package main import ( big "." "runtime" ) func fibber(c chan *big.Int, out chan string, n int64) {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Mon Apr 10 22:32:35 UTC 2023 - 919 bytes - Viewed (0) -
internal/grid/connection_test.go
}() cleanReqs := make(chan struct{}) gotCall := make(chan struct{}) defer close(cleanReqs) // 1: Block forever h1 := func(payload []byte) ([]byte, *RemoteErr) { gotCall <- struct{}{} <-cleanReqs return nil, nil } // 2: Also block, but with streaming. h2 := StreamHandler{ Handle: func(ctx context.Context, payload []byte, request <-chan []byte, resp chan<- []byte) *RemoteErr {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jul 08 21:44:00 UTC 2024 - 5.9K bytes - Viewed (0) -
internal/pubsub/pubsub.go
select { case sub.ch <- item: default: } } } } // Subscribe - Adds a subscriber to pubsub system func (ps *PubSub[T, M]) Subscribe(mask M, subCh chan T, doneCh <-chan struct{}, filter func(entry T) bool) error { totalSubs := atomic.AddInt32(&ps.numSubscribers, 1) if ps.maxSubscribers > 0 && totalSubs > ps.maxSubscribers { atomic.AddInt32(&ps.numSubscribers, -1)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Feb 06 16:57:30 UTC 2024 - 5.2K bytes - Viewed (0) -
internal/grid/muxclient.go
responseCh <- resp } } func (m *muxClient) handleTwowayRequests(errResp chan<- Response, requests <-chan []byte) { var errState bool if debugPrint { start := time.Now() defer func() { fmt.Println("Mux", m.MuxID, "Request took", time.Since(start).Round(time.Millisecond)) }() } var pingTimer <-chan time.Time if m.deadline == 0 || m.deadline > m.clientPingInterval {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Jun 07 15:51:52 UTC 2024 - 15.9K bytes - Viewed (0) -
internal/grid/handlers.go
// An optional subroute can be given. Multiple entries are joined with '/'. func (h *StreamTypeHandler[Payload, Req, Resp]) RegisterNoPayload(m *Manager, handle func(ctx context.Context, in <-chan Req, out chan<- Resp) *RemoteErr, subroute ...string) error { h.WithPayload = false return h.register(m, func(ctx context.Context, p Payload, in <-chan Req, out chan<- Resp) *RemoteErr { return handle(ctx, in, out)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 09 16:58:30 UTC 2024 - 27.7K bytes - Viewed (0)