- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 153 for CHAN (0.04 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
if debugPrint { fmt.Println("connected stream mux:", ack.MuxID) } }() // 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) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Jun 07 15:51:52 UTC 2024 - 9.7K 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) -
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/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) -
misc/cgo/gmp/fib.go
// 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) { // Keep the fibbers in dedicated operating system // threads, so that this program tests coordination // between pthreads and not just goroutines. runtime.LockOSThread() i := big.NewInt(n)
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/handlers.go
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) }, subroute...) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 09 16:58:30 UTC 2024 - 27.7K bytes - Viewed (0) -
internal/dsync/drwmutex_test.go
func doTestParallelReaders(numReaders, gomaxprocs int) { runtime.GOMAXPROCS(gomaxprocs) m := NewDRWMutex(ds, "test-parallel") clocked := make(chan bool) cunlock := make(chan bool) cdone := make(chan bool) for i := 0; i < numReaders; i++ { go parallelReader(context.Background(), m, clocked, cunlock, cdone) } // Wait for all parallel RLock()s to succeed. for i := 0; i < numReaders; i++ { <-clocked }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sat Dec 24 03:49:07 UTC 2022 - 9.7K bytes - Viewed (0)