Does Boost :: asio run various services in streams?

It seems that all the examples always show the launch of the same io_service in all threads.

Can I run multiple io_services? Here is what I would like to do:

Run io_service A in the main thread to handle user input ...

Run another io_service B in another thread, which then can start a bunch of worker threads all share io_service B.

Users in io_service A can โ€œsubmitโ€ work to io_service B so that this is done in the work pool, but you should not do work on io_service A, that is, the main thread.

Is it possible? It makes sense?

thank

+5
source share
2 answers

, , io_service . asio-users.

Boost.Asio HTTP Server 2 HTTP Server 3. , HTTP- , , . , .

, Boost.Asio

  • io_service
  • io_service
+2

!

, . , , , . , , - asio. / , , . , , io , .

, , , , IMO - , - .

, , WRT, ( , ): fooobar.com/questions/189770/...

+1

All Articles