Fix deadlock when stopping on non-empty file/buffer#7
Conversation
At the same time also fix some lint issues (deadcode and comments). Fixes hpcloud/tail#93
|
Thank you, I'll review the changes as soon as possible. I had a quick look and the changes in the test file reminded me of my wish to replace the tomb v1 dependency by tomb v2 (or something else context based). v2 does not have the Done() method: If you have any thoughts about that, your input is always welcome |
|
Hi I don't have deep opinions about which lib to use. But I think the tomb thingy should not be embedded. Making the methods public is problematic. I.e. calling Once it is removed from the public API you would also be more flexible to choose whatever lib you want. I will wrap this lib in a tail library for my use case and at first I used a context approach in my wrapping library. But it didn't work out since it lead to racy tests, since I really want to wait until the Stop method returns. Not sure if using a context approach in the lib would work out. But if it does it would certainly be nice. |
|
Thanks for PR! I'll add a note to the issue tracking as well. |
At the same time also fix some lint issues (deadcode and comments).
Fixes hpcloud/tail#93