Skip to content

Stream encoding with gojay seems to be a problem. #169

Description

@shawlleyw

I was just running the stream encoding example given in README and got into trouble.

  1. Stream encoding API supports enc.Done() to synchronize consumers and help them exit after all jobs are done. However it does not support any ways to notify consumers that no more jobs would be delivered in future. Unfortunately this would trap all consumers into endless wait, or deadlock.

fatal error: all goroutines are asleep - deadlock!

  1. The order of output stream is not consistent with input stream while mulitiple consumers are working together.

By the way, the example given in README has a trivial bug, enc.Object(o) should not be called there, it should be enc.AddObject(o) instead.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions