crow icon indicating copy to clipboard operation
crow copied to clipboard

hi,about the http sequence

Open suppersam1 opened this issue 2 years ago • 3 comments

Hi, may I ask if the HTTP requests from the same route in the crow are strictly executed in sequence, and if the requests from the same route are stored in a queue and then executed in FIFO order

suppersam1 avatar Apr 12 '23 12:04 suppersam1

I'm not very familiar with boost:: asio:: io_ service, I have looked at the code for crow and found that without opening multiple threads, only one thread calls boost:: asio:: io_service. run() method. Does this mean that HTTP requests will be executed sequentially?

suppersam1 avatar Apr 13 '23 02:04 suppersam1

not exactly, io processes have also wait states where the next request can be started. so they can be executed at least partially overlapping. maybe that is a good start to read: https://think-async.com/Asio/asio-1.26.0/doc/asio/overview/model/async_ops.html

gittiver avatar Apr 19 '23 21:04 gittiver

not exactly, io processes have also wait states where the next request can be started. so they can be executed at least partially overlapping. maybe that is a good start to read: https://think-async.com/Asio/asio-1.26.0/doc/asio/overview/model/async_ops.html

Is there any way to solve this problem?The Crow framework seems unable to strictly follow the order of HTTP requests.

suppersam1 avatar Apr 26 '23 12:04 suppersam1