浏览代码

warn about Errors() capacity

Burke Libbey 12 年之前
父节点
当前提交
65e6c409e0
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      producer.go

+ 3 - 1
producer.go

@@ -40,7 +40,9 @@ type ProducerConfig struct {
 // operating in "synchronous" mode. This means that errors will be returned
 // directly from calls to SendMessage. If either value is greater than zero, the
 // Producer is operating in "asynchronous" mode, and you must read these return
-// values back from the channel returned by Errors().
+// values back from the channel returned by Errors(). Note that you actually
+// *must* read these error values: The channel has a fixed capacity, and the
+// producer will block if it's full.
 type Producer struct {
 	client          *Client
 	config          ProducerConfig