Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 1,979 for Chan (0.13 sec)

  1. vendor/github.com/aws/aws-sdk-go/aws/csm/metric_chan.go

    	pausedEnum
    )
    
    var (
    	// MetricsChannelSize of metrics to hold in the channel
    	MetricsChannelSize = 100
    )
    
    type metricChan struct {
    	ch     chan metric
    	paused *int64
    }
    
    func newMetricChan(size int) metricChan {
    	return metricChan{
    		ch:     make(chan metric, size),
    		paused: new(int64),
    	}
    }
    
    func (ch *metricChan) Pause() {
    	atomic.StoreInt64(ch.paused, pausedEnum)
    }
    
    Go
    - Registered: 2020-07-20 07:43
    - Last Modified: 2019-11-14 21:51
    - 857 bytes
    - Viewed (0)
  2. proxy/grpcproxy/adapter/chan_stream.go

    }
    
    func newPipeStream(ctx context.Context, ssHandler func(chanServerStream) error) chanClientStream {
    	// ch1 is buffered so server can send error on close
    	ch1, ch2 := make(chan interface{}, 1), make(chan interface{})
    	headerc, trailerc := make(chan metadata.MD, 1), make(chan metadata.MD, 1)
    
    	cctx, ccancel := context.WithCancel(ctx)
    	cli := &chanStream{recvc: ch1, sendc: ch2, ctx: cctx, cancel: ccancel}
    Go
    - Registered: 2020-08-06 01:10
    - Last Modified: 2019-08-05 20:27
    - 3.8K bytes
    - Viewed (0)
  3. vendor/github.com/aws/aws-sdk-go/aws/csm/metric_chan.go

    	pausedEnum
    )
    
    var (
    	// MetricsChannelSize of metrics to hold in the channel
    	MetricsChannelSize = 100
    )
    
    type metricChan struct {
    	ch     chan metric
    	paused *int64
    }
    
    func newMetricChan(size int) metricChan {
    	return metricChan{
    		ch:     make(chan metric, size),
    		paused: new(int64),
    	}
    }
    
    func (ch *metricChan) Pause() {
    	atomic.StoreInt64(ch.paused, pausedEnum)
    }
    
    Go
    - Registered: 2020-08-05 16:43
    - Last Modified: 2019-12-09 23:16
    - 857 bytes
    - Viewed (0)
  4. packages/core/__tests__/interpreter/flush.js

      function* genFn() {
        const chan = yield io.call(channel)
        actual.push(yield io.flush(chan))
        yield io.put(chan, 1)
        yield io.put(chan, 2)
        yield io.put(chan, 3)
        actual.push(yield io.flush(chan))
        yield io.put(chan, 4)
        yield io.put(chan, 5)
        chan.close()
        actual.push(yield io.flush(chan))
        actual.push(yield io.flush(chan))
      }
    
      const task = middleware.run(genFn)
    JavaScript
    - Registered: 2020-08-02 15:07
    - Last Modified: 2018-08-16 21:08
    - 879 bytes
    - Viewed (0)
  5. distribution/xfer/transfer.go

    	// started detaching.
    	broadcastSyncChan chan struct{}
    }
    
    // NewTransfer creates a new transfer.
    func NewTransfer() Transfer {
    	t := &transfer{
    		watchers:          make(map[chan struct{}]*Watcher),
    		running:           make(chan struct{}),
    		released:          make(chan struct{}),
    		broadcastSyncChan: make(chan struct{}),
    	}
    
    Go
    - Registered: 2020-08-05 12:04
    - Last Modified: 2020-07-14 08:48
    - 10.8K bytes
    - Viewed (0)
  6. pkg/pubsub/pubsub_test.go

    	ps := New()
    	ch1 := make(chan interface{}, 1)
    	ch2 := make(chan interface{}, 1)
    	doneCh := make(chan struct{})
    	defer close(doneCh)
    	ps.Subscribe(ch1, doneCh, nil)
    	ps.Subscribe(ch2, doneCh, nil)
    	ps.Lock()
    	defer ps.Unlock()
    	if len(ps.subs) != 2 {
    		t.Errorf("expected 2 subscribers")
    	}
    }
    
    func TestUnsubscribe(t *testing.T) {
    	ps := New()
    	ch1 := make(chan interface{}, 1)
    Go
    - Registered: 2020-08-02 16:08
    - Last Modified: 2019-06-27 05:41
    - 2.3K bytes
    - Viewed (0)
  7. modules/drivers/druid/test/metabase/driver/druid/client_test.clj

            (mt/with-open-channels [running-chan (a/promise-chan)
                                    cancel-chan  (a/promise-chan)]
              (with-redefs [druid.client/DELETE   (fn [& _]
                                                    (a/>!! cancel-chan ::cancel))
                            druid.client/do-query (fn [& _]
                                                    (a/>!! running-chan ::running)
    Others
    - Registered: 2020-05-24 03:16
    - Last Modified: 2020-03-09 22:07
    - 2.4K bytes
    - Viewed (0)
  8. src/nvim/channel.h

    }
    
    static inline Stream *channel_instream(Channel *chan)
      FUNC_ATTR_NONNULL_ALL
    {
      switch (chan->streamtype) {
        case kChannelStreamProc:
          return &chan->stream.proc.in;
    
        case kChannelStreamSocket:
          return &chan->stream.socket;
    
        case kChannelStreamStdio:
          return &chan->stream.stdio.out;
    
        case kChannelStreamInternal:
        case kChannelStreamStderr:
    C
    - Registered: 2020-07-13 08:44
    - Last Modified: 2020-02-23 08:49
    - 2.8K bytes
    - Viewed (0)
  9. executor/index_merge_reader.go

    		e.keyRanges = append(e.keyRanges, keyRange)
    	}
    	e.finished = make(chan struct{})
    	e.resultCh = make(chan *lookupTableTask, atomic.LoadInt32(&LookupTableTaskChannelSize))
    	return nil
    }
    
    func (e *IndexMergeReaderExecutor) startWorkers(ctx context.Context) error {
    	exitCh := make(chan struct{})
    	workCh := make(chan *lookupTableTask, 1)
    	fetchCh := make(chan *lookupTableTask, len(e.keyRanges))
    
    Go
    - Registered: 2020-08-06 09:02
    - Last Modified: 2020-08-04 12:38
    - 20.4K bytes
    - Viewed (0)
  10. eBook/exercises/chapter_14/gofibonacci3.go

    package main
    
    import (
    	"fmt"
    	"time"
    )
    
    func dup3(in <-chan int) (<-chan int, <-chan int, <-chan int) {
    	a, b, c := make(chan int, 2), make(chan int, 2), make(chan int, 2)
    	go func() {
    		for {
    			x := <-in
    			a <- x
    			b <- x
    			c <- x
    		}
    	}()
    	return a, b, c
    }
    
    func fib() <-chan int {
    	x := make(chan int, 2)
    	a, b, out := dup3(x)
    	go func() {
    		x <- 0
    		x <- 1
    		<-a
    Go
    - Registered: 2020-06-21 19:59
    - Last Modified: 2019-08-16 21:34
    - 713 bytes
    - Viewed (0)
Back to top