Skip to content

timeout on send #333

@plastikfan

Description

@plastikfan

consider using an output controller, that was created before but not required then:

type outputController struct {
	pool *core.TraversePool
	wg   pants.WaitGroup
}

func (c *outputController) Conclude(ctx context.Context) {
	c.pool.Conclude(ctx)
}

func (c *outputController) StartCancellationMonitor(ctx context.Context,
	cancellation *core.Cancellation,
) {
	if cc := c.pool.CancelCh(); cc != nil {
		pants.StartCancellationMonitor(ctx,
			cancellation.Cancel,
			c.wg,
			cc,
			cancellation.On,
		)
	}
}

core:

	// OutputFunc
	OutputFunc func(ctrl OutputController, outs OutputStream)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions