-
Notifications
You must be signed in to change notification settings - Fork 40
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
Fix/properly terminate read operations #179
Conversation
Testing that right now 👍 Just for my personal improvement, why not use |
no good reasons I assure you 😅 -- mostly was just trying to change as little as possible at the moment. Probably thats a better idea/way to go but.... this works (I think/hope) 😁 |
I tested this PR, but on the latest main (with byot): https://github.com/netixx/scrapligo/tree/read-timeout Most of the deadlocking is gone, but I am still getting goroutines stuck:
for 1/: for 2/: for 3/ I don't know how you want to handle those issues, my approach would be to have a global cancellable context in the driver and channel, and checking everywhere there is a blocking operation, whether the context is Done or not. In the future maybe we can pass the context from the caller with a If it's a solution that you think could work, I can work on it if you like. |
copy, thanks for digging in again @netixx! ill try to take a closer look at this later today or tomorrow and get back to ya! |
ok @netixx I think I fixed the last of them w/ that lats commit. its not beautiful but should work 🤣
I think "yes" this sounds way smarter/saner/better way to go about it in general... I think at some point a "v2" should follow this path. im not sure I have the energy to do that anytime soon (especially as there would be a lot of other stuff id want to change I think), but if you are hyped about it and wanted to start a branch maybe we could chip away at it over a long-ish period of time? |
Ok, if I have some time laying around, I'll attempt to do something with contexts :) In the meantime, this fixes my issue 👍 👍 Thanks for all your help and work!! |
fixes #178 (I think/hope)
cc/ @netixx