1. HTTP.jl
I’m looking for correct solution for asynchronous handling requests by HTTP.jl. Please, do you know how should I implement this behavior?
1 thread request handling:
function requestHandler(req::HTTP.Request)::HTTP.Messages.Response
# code
end
HTTP.serve(requestHandler, "0.0.0.0", 8080)
Is this correct?
function requestHandler(req::HTTP.Request)::HTTP.Messages.Response
#code
end
servers = []
for i in 1:nthreads()
push!(Threads.@spawn HTTP.serve(handler, host, 8080))
end
2. LibPQ.jl
I’m planning to use LibPQ inside these threads, do I need to configure something?