Closed dewei-verkada closed 2 years ago
@sbinet Could I get a review please?
Merging #114 (c9da575) into master (03db79d) will decrease coverage by
0.01%
. The diff coverage is87.50%
.
@@ Coverage Diff @@
## master #114 +/- ##
==========================================
- Coverage 67.36% 67.34% -0.02%
==========================================
Files 29 29
Lines 1811 1813 +2
==========================================
+ Hits 1220 1221 +1
- Misses 490 491 +1
Partials 101 101
Impacted Files | Coverage Δ | |
---|---|---|
pub.go | 69.11% <0.00%> (ø) |
|
msgio.go | 78.82% <100.00%> (+0.51%) |
:arrow_up: |
router.go | 79.79% <100.00%> (ø) |
|
internal/inproc/inproc.go | 70.88% <0.00%> (-1.27%) |
:arrow_down: |
socket.go | 83.04% <0.00%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 03db79d...c9da575. Read the comment docs.
thanks a lot (and for sticking with us).
welcome!
Currently
semaphore
will block aqreader
read from exiting even when the context have been canceled. From what I can tell its purpose is to guarantee there is a connection first (fromaddConn
) before the read could proceed. However, this requirement makes it hard to write unit tests that might be blocked on waiting for the context to finish.This change adds context into the semaphore so that read can be unblocked when the context is canceled, instead of resulting in a deadlock.