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

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Boost - Users mailing list
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-threading

Lets say the build environment is this one:

curtine/dockerfiles-fat:ubuntu18.04

Regards,

Eric
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

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

Boost - Users mailing list
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.
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users