suxunbin
suxunbin
I have read the https://github.com/eidheim/Simple-Web-Server/blob/master/http_examples.cpp#L183 example.  My purpose is to use referrence of the response and request object on the location in the picture. In other words, I hope...
However, I need thread scheduling. So I only store them in query_handler(). Another thread is responsible for query_thread(). I can't directly pass the shared_ptr to query_thread() in query_handler(). I need...
For example,if there are 60 queries but I only have 30 threads in the threadpool. If I directly pass the shared_ptr to query_thread().Then there are 30 shared_ptr that can't pass.I...
In this way,if 30 threads are running,then what about the new shared_ptr ?
If use workers.service.post, how should I sort these handlers in io_service. I could not handle thest tasks according to the order of their entry.
  I use the example you give me. But client gets nothing.
 If I don't use workers.service.post(), client can directly get the data.
So, when I leave this scope, the response shared_ptr becomes invalid.