Skip to content
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

Do not migrate tasks to a different thread pool #1159

Merged
merged 1 commit into from
Mar 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "HTTP"
uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3"
authors = ["Jacob Quinn", "contributors: https://github.com/JuliaWeb/HTTP.jl/graphs/contributors"]
version = "1.10.3"
version = "1.10.4"

[deps]
Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
Expand All @@ -22,7 +22,7 @@ UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"

[compat]
CodecZlib = "0.7"
ConcurrentUtilities = "2.2"
ConcurrentUtilities = "2.4"
ExceptionUnwrapping = "0.1"
LoggingExtras = "0.4.9,1"
MbedTLS = "0.6.8, 0.7, 1"
Expand Down
5 changes: 3 additions & 2 deletions src/clientlayers/StreamRequest.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module StreamRequest
using ..IOExtras, ..Messages, ..Streams, ..Connections, ..Strings, ..RedirectRequest, ..Exceptions
using LoggingExtras, CodecZlib, URIs
using SimpleBufferStream: BufferStream
using ConcurrentUtilities: @samethreadpool_spawn

export streamlayer

Expand Down Expand Up @@ -36,7 +37,7 @@ function streamlayer(stream::Stream; iofunction=nothing, decompress::Union{Nothi
# use a lock here for request.context changes (this is currently the only places
# where multiple threads may modify/change context at the same time)
lock = ReentrantLock()
Threads.@spawn try
@samethreadpool_spawn try
writebody(stream, req, lock)
finally
Base.@lock lock begin
Expand All @@ -46,7 +47,7 @@ function streamlayer(stream::Stream; iofunction=nothing, decompress::Union{Nothi
closewrite(stream)
end
read_start = time()
Threads.@spawn try
@samethreadpool_spawn try
@debugv 2 "client startread"
startread(stream)
if !isaborted(stream)
Expand Down
Loading