Sfoglia il codice sorgente

warn about Errors() capacity

Burke Libbey 12 anni fa
parent
commit
65e6c409e0
1 ha cambiato i file con 3 aggiunte e 1 eliminazioni
  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
 // operating in "synchronous" mode. This means that errors will be returned
 // directly from calls to SendMessage. If either value is greater than zero, the
 // 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
 // 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 {
 type Producer struct {
 	client          *Client
 	client          *Client
 	config          ProducerConfig
 	config          ProducerConfig