-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Subreddit Comment Retrieval and Stream Concurrency #12
base: master
Are you sure you want to change the base?
Conversation
a1bdd88
to
9507ee4
Compare
9507ee4
to
feefde3
Compare
This PR should be ready for review / merge |
panic happens sometimes with this pr (may exist in original code) panic: send on closed channel
goroutine 93559 [running]:
github.com/vartanbeno/go-reddit/v2/reddit.(*StreamService).Posts.func2.1(0xc000081800, 0x64, 0x80, 0x0, 0x0)
go-reddit/reddit/stream.go:91 +0xc5
github.com/vartanbeno/go-reddit/v2/reddit.(*StreamService).getPosts(0xc000286288, 0x9bc961, 0x3, 0xc00089c000)
go-reddit/reddit/stream.go:193 +0x106
created by github.com/vartanbeno/go-reddit/v2/reddit.(*StreamService).Posts.func2
go-reddit/reddit/stream.go:60 +0x198 possible fix based on this PR: darren@3926707 |
@darren Would you mind making a PR against this branch in my fork so I can easily add your code / give you credit for it? |
@RGood my fix above is still buggy, panic occasionally: panic: send on closed channel goroutine 347827 [running]: So using a quitChan is still tricky and not fixing the problem, I opened another PR RGood#1 by using context |
simplify stop logic using context with cancel
This PR currently sits on top of comment-support as it builds on top of some of it.
Changelog:
set{}
struct to its ownhelper
file and refactor it toOrderedMaxSet
go-reddit
specificOrderedMaxSet
should handle de-duping request responsesConsiderations: