Newer
Older
// you shouldn't be batching more than this. really, you shouldn't be using batching at all.
// TODO: make this configurable
const maxBatchSizeBytes = 1024 * 1024 * 1024 * 16
// streamingRespWriter is NOT thread safe
type streamingRespWriter struct {
}
// only override error if not already set
if ce.err == nil {
ce.err = e
}
err = c.cr.mu.Acquire(c.ctx, 1)
if err != nil {
return err
}
defer c.cr.mu.Release(1)
err := c.cr.mu.Acquire(c.ctx, 1)
if err != nil {
return err
}
defer c.cr.mu.Release(1)
err = c.cr.notify(c.ctx, ¬ifyEnv{
if err != nil {
return err
}
err = c.cr.remote.Flush()
if err != nil {
return err
}
return nil