Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 277 for mkchan (0.05 sec)

  1. internal/grid/connection_test.go

    1. }()
    2.  
    3. cleanReqs := make(chan struct{})
    4. gotCall := make(chan struct{})
    5. defer close(cleanReqs)
    6. // 1: Block forever
    7. h1 := func(payload []byte) ([]byte, *RemoteErr) {
    8. gotCall <- struct{}{}
    9. <-cleanReqs
    10. return nil, nil
    11. }
    12. // 2: Also block, but with streaming.
    13. h2 := StreamHandler{
    14. 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)
  2. internal/pubsub/pubsub.go

    1. select {
    2. case sub.ch <- item:
    3. default:
    4. }
    5. }
    6. }
    7. }
    8.  
    9. // Subscribe - Adds a subscriber to pubsub system
    10. func (ps *PubSub[T, M]) Subscribe(mask M, subCh chan T, doneCh <-chan struct{}, filter func(entry T) bool) error {
    11. totalSubs := atomic.AddInt32(&ps.numSubscribers, 1)
    12. if ps.maxSubscribers > 0 && totalSubs > ps.maxSubscribers {
    13. 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)
  3. android/guava-tests/benchmark/com/google/common/math/StatsBenchmark.java

    1. @Override
    2. double mean(double[] values) {
    3. double sum = 0.0;
    4. for (double value : values) {
    5. sum += value;
    6. }
    7. return sum / values.length;
    8. }
    9. },
    10. KAHAN {
    11. @Override
    12. double mean(double[] values) {
    13. double sum = 0.0;
    14. double c = 0.0;
    15. for (double value : values) {
    16. double y = value - c;
    17. double t = sum + y;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Dec 04 17:37:03 UTC 2017
    - 4.7K bytes
    - Viewed (0)
  4. internal/grid/handlers.go

    1. func (h *StreamTypeHandler[Payload, Req, Resp]) RegisterNoPayload(m *Manager, handle func(ctx context.Context, in <-chan Req, out chan<- Resp) *RemoteErr, subroute ...string) error {
    2. h.WithPayload = false
    3. return h.register(m, func(ctx context.Context, p Payload, in <-chan Req, out chan<- Resp) *RemoteErr {
    4. return handle(ctx, in, out)
    5. }, subroute...)
    6. }
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Sep 09 16:58:30 UTC 2024
    - 27.7K bytes
    - Viewed (0)
  5. internal/s3select/simdj/reader.go

    1. )
    2.  
    3. // Reader - JSON record reader for S3Select.
    4. type Reader struct {
    5. args *json.ReaderArgs
    6. input chan simdjson.Stream
    7. decoded chan simdjson.Object
    8.  
    9. // err will only be returned after decoded has been closed.
    10. err *error
    11. readCloser io.ReadCloser
    12. onReaderExit func()
    13.  
    14. exitReader chan struct{}
    15. readerWg sync.WaitGroup
    16. }
    17.  
    18. // Read - reads single record.
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue May 30 17:02:22 UTC 2023
    - 4.9K bytes
    - Viewed (0)
  6. internal/lsync/lrwmutex_test.go

    1. if m.GetRLock(ctx, "", "", time.Second) {
    2. clocked <- true
    3. <-cunlock
    4. m.RUnlock()
    5. cdone <- true
    6. }
    7. }
    8.  
    9. // Borrowed from rwmutex_test.go
    10. func doTestParallelReaders(numReaders, gomaxprocs int) {
    11. runtime.GOMAXPROCS(gomaxprocs)
    12. m := NewLRWMutex()
    13.  
    14. clocked := make(chan bool)
    15. cunlock := make(chan bool)
    16. cdone := make(chan bool)
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sun Mar 05 04:57:35 UTC 2023
    - 7.9K bytes
    - Viewed (0)
  7. internal/dsync/drwmutex_test.go

    1. func doTestParallelReaders(numReaders, gomaxprocs int) {
    2. runtime.GOMAXPROCS(gomaxprocs)
    3. m := NewDRWMutex(ds, "test-parallel")
    4.  
    5. clocked := make(chan bool)
    6. cunlock := make(chan bool)
    7. cdone := make(chan bool)
    8. for i := 0; i < numReaders; i++ {
    9. go parallelReader(context.Background(), m, clocked, cunlock, cdone)
    10. }
    11. // Wait for all parallel RLock()s to succeed.
    12. for i := 0; i < numReaders; i++ {
    13. <-clocked
    14. }
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sat Dec 24 03:49:07 UTC 2022
    - 9.7K bytes
    - Viewed (0)
  8. docs/de/docs/help-fastapi.md

    1. ### Der Stil ist nicht so wichtig
    2.  
    3. * Machen Sie sich nicht zu viele Gedanken über Dinge wie den Stil von Commit-Nachrichten, ich werde den Commit manuell zusammenführen und anpassen.
    4.  
    5. * Machen Sie sich auch keine Sorgen über Stilregeln, es gibt bereits automatisierte Tools, die das überprüfen.
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Aug 06 04:48:30 UTC 2024
    - 16K bytes
    - Viewed (0)
  9. internal/grid/grid_test.go

    1. remoteHost := remote.HostName()
    2.  
    3. // 1: Echo
    4. serverSent := make(chan struct{})
    5. serverCanceled := make(chan struct{})
    6. register := func(manager *Manager) {
    7. errFatal(manager.RegisterStreamingHandler(handlerTest, StreamHandler{
    8. Handle: func(ctx context.Context, payload []byte, _ <-chan []byte, resp chan<- []byte) *RemoteErr {
    9. // Send many responses.
    10. // Test that this doesn't block.
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Jul 29 18:10:04 UTC 2024
    - 36.4K bytes
    - Viewed (0)
  10. internal/s3select/jstream/scanner.go

    1. nbuf [chunk]byte // next internal buffer
    2. fillReq chan struct{}
    3. fillReady chan int64
    4. readerErr error // underlying reader error, if any
    5. }
    6.  
    7. func newScanner(r io.Reader) *scanner {
    8. sr := &scanner{
    9. end: maxInt,
    10. fillReq: make(chan struct{}),
    11. fillReady: make(chan int64),
    12. }
    13.  
    14. go func() {
    15. var rpos int64 // total bytes read into buffer
    16.  
    17. defer func() {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Sep 23 19:35:41 UTC 2024
    - 2.5K bytes
    - Viewed (0)
Back to top