Build boost asio http server examples single threaded using c++03

Hi Guys, I was wondering if anyone could help me out building all the boost asio http server examples from: https://github.com/boostorg/asio/tree/develop/example/cpp03/http But catch is, I need to use c++03/98, single threaded without dependencies on std::thread, boost::thread or posix threads. I also need static linking to all the other boost libraries. Also want to compile with g++ -O3 -flto on x86_64 Linux. How can I build these examples like this? This is also a question on stackoverflow: https://stackoverflow.com/questions/53822438/building-boost-asio-without-thr... Lets say the build environment is this one: curtine/dockerfiles-fat:ubuntu18.04 Regards, Eric

On 19/12/2018 03:11, Eric Curtin wrote:
I was wondering if anyone could help me out building all the boost asio http server examples from:
https://github.com/boostorg/asio/tree/develop/example/cpp03/http
But catch is, I need to use c++03/98, single threaded without dependencies on std::thread, boost::thread or posix threads. I also need static linking to all the other boost libraries. Also want to compile with g++ -O3 -flto on x86_64 Linux. How can I build these examples like this?
It's not possible. Asio internally uses mutexes (which require some kind of threading library). Additionally in order to implement certain kinds of async operations, Asio actually needs to create a small number of worker threads.
participants (2)
-
Eric Curtin
-
Gavin Lambert