Skip to content

Commit

Permalink
Do not migrate tasks to a different thread pool
Browse files Browse the repository at this point in the history
  • Loading branch information
samtkaplan committed Mar 11, 2024
1 parent e27493d commit a6f74e8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
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

0 comments on commit a6f74e8

Please sign in to comment.