Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The close(timeout) should work when called from a user caller thread or the internal sender thread.

When timeout is 0negative, it fails all unsent messages and close the producer without waiting.

When timeout is 0, it will block forever waiting for all the pending send request to finish.

Because it is possible the close(timeout) is called for multiple times, it has to be idempotent.

...