Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of about 10,000 for Chan (0.75 sec)

  1. server/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: 2021-01-14 01:10
    - Last Modified: 2020-10-26 11:57
    - 3.8K 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-10-22 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: 2021-01-13 16:43
    - Last Modified: 2019-12-09 23:16
    - 857 bytes
    - Viewed (0)
  4. pkg/report/weighted.go

    func (wr *weightedReport) Run() <-chan string {
    	donec := make(chan string, 2)
    	go func() {
    		defer close(donec)
    		basec, rc := make(chan string, 1), make(chan Stats, 1)
    		go func() { basec <- (<-wr.baseReport.Run()) }()
    		go func() { rc <- (<-wr.report.Stats()) }()
    		go wr.processResults()
    		wr.report.stats = wr.reweighStat(<-rc)
    		donec <- wr.report.String()
    		donec <- (<-basec)
    	}()
    	return donec
    }
    
    Go
    - Registered: 2021-01-14 01:10
    - Last Modified: 2017-05-17 23:07
    - 2.6K 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: 2021-01-13 12:04
    - Last Modified: 2020-07-14 08:48
    - 10.8K bytes
    - Viewed (0)
  6. packages/core/__tests__/channel.js

      chan.put(1) // channel must notify takers
    
      expect(actual).toEqual([1])
      cb.cancel()
      chan.put(1) // channel must discard cancelled takes
    
      expect(actual).toEqual([1])
      actual = []
      chan.take(logger())
      chan.take(logger())
      chan.close() // closing a channel must resolve all takers with END
    
      expect(actual).toEqual([END, END])
      actual = []
      chan.take(logger()) // closed channel must resolve new takers with END
    
    JavaScript
    - Registered: 2021-01-17 15:07
    - Last Modified: 2018-08-16 21:23
    - 4.8K bytes
    - Viewed (0)
  7. daemon/logger/awslogs/cwlogsiface_mock_test.go

    )
    
    type mockcwlogsclient struct {
    	createLogGroupArgument  chan *cloudwatchlogs.CreateLogGroupInput
    	createLogGroupResult    chan *createLogGroupResult
    	createLogStreamArgument chan *cloudwatchlogs.CreateLogStreamInput
    	createLogStreamResult   chan *createLogStreamResult
    	putLogEventsArgument    chan *cloudwatchlogs.PutLogEventsInput
    	putLogEventsResult      chan *putLogEventsResult
    }
    
    type createLogGroupResult struct {
    Go
    - Registered: 2021-01-13 12:04
    - Last Modified: 2018-02-05 21:51
    - 3.8K bytes
    - Viewed (0)
  8. 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: 2021-01-17 16:08
    - Last Modified: 2019-06-27 05:41
    - 2.3K bytes
    - Viewed (0)
  9. packages/core/__tests__/channel-recipes.js

      function* saga() {
        const chan = channel()
    
        try {
          for (var i = 0; i < 3; i++) {
            yield fork(worker, i + 1, chan)
          }
    
          while (true) {
            const { payload } = yield take('ACTION')
            yield put(chan, payload)
          }
        } finally {
          chan.close()
        }
      }
    
      function* worker(idx, chan) {
        let count = 0
    
        while (true) {
    JavaScript
    - Registered: 2021-01-17 15:07
    - Last Modified: 2019-01-20 12:32
    - 3.6K bytes
    - Viewed (0)
  10. packages/core/__tests__/interpreter/takeSync.js

      const actual = []
      const chan = channel()
      const middleware = sagaMiddleware()
      const store = createStore(() => {}, applyMiddleware(middleware))
    
      function* fnA() {
        actual.push(yield take(chan))
        yield put(chan, 'ack-1')
        yield Promise.resolve()
        actual.push(yield take(chan))
        yield put(chan, 'ack-2')
      }
    
      function* fnB() {
        yield put(chan, 'msg-1')
        yield Promise.resolve()
    JavaScript
    - Registered: 2021-01-17 15:07
    - Last Modified: 2018-10-10 08:32
    - 14.9K bytes
    - Viewed (0)
Back to top