nsqio / go-diskqueue

A Go package providing a filesystem-backed FIFO queue
MIT License
467 stars 101 forks source link

change ReadChan to return receive-only chan #7

Closed bitpeng closed 4 years ago

bitpeng commented 4 years ago

ReadChan should return receive-only chan for reading.

bitpeng commented 4 years ago

@ploxiln @mreiferson

ploxiln commented 4 years ago

The concern is that this is an API-breaking change, and existing users will need to update, and will not be able to be compatible with both older and latest version at the same time.

But hopefully there are very few users besides nsq, and hopefully all users lock to specific versions like nsq does. So, because I haven't seen any objections, and I want to lean towards letting the codebase keep moving, though at a slow pace ... I'll merge.

ploxiln commented 4 years ago

(I ran the minimal tests in this repo locally)