Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Vladimir Barsukov
zdb
Commits
9d9a0a38
Commit
9d9a0a38
authored
Jul 16, 2023
by
Vladimir Barsukov
Browse files
fix
parent
a91ab05c
Changes
1
Hide whitespace changes
Inline
Side-by-side
pool.go
View file @
9d9a0a38
...
...
@@ -83,15 +83,13 @@ func (d *Pool) WithContext(ctx context.Context) *Pool {
}
func
(
d
*
Pool
)
WithTimeout
(
dur
time
.
Duration
)
*
Pool
{
ctx
,
cancel
:=
context
.
WithTimeout
(
d
.
ctx
,
dur
)
defer
cancel
()
ctx
,
_
:=
context
.
WithTimeout
(
d
.
ctx
,
dur
)
return
d
.
WithContext
(
ctx
)
}
func
(
d
*
Pool
)
WithDeadline
(
dur
time
.
Time
)
*
Pool
{
ctx
,
cancel
:=
context
.
WithDeadline
(
d
.
ctx
,
dur
)
defer
cancel
()
ctx
,
_
:=
context
.
WithDeadline
(
d
.
ctx
,
dur
)
return
d
.
WithContext
(
ctx
)
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment