time.Sleep() after CancelRequest
- Dominant language
- Go
- Stars
- 14.3k
- Forks
- 1.1k
- Avg merge
- 6d 9h
- Merged PRs (30d)
- 11
Description
Hi, I want to use CancelRequestContextWatcherHandler to cancel requests after a context timeout on a request, and I see here time.Sleep, which in fact holds the connection for 100ms just like that. Is there, in theory, some kind of synchronization option?
https://github.com/jackc/pgx/blob/98e7e9f2975b2a904d3eee25c453297dcb58c7cc/pgconn/pgconn.go#L2509
Contributor guide
Research direction
Start at pgconn/pgconn.go around line 2509 and trace CancelRequestContextWatcherHandler through the context-timeout cancellation path. Determine the intended synchronization contract for the 100ms delay and whether an option is appropriate. Done means the cancellation behavior and any synchronization option are specified and validated with focused coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, postgresql
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100