Commit Graph

2590 Commits

Author SHA1 Message Date
Christopher Kohlhoff
d25a180430 Update system_executor to standard executor form. 2020-06-23 11:07:35 +10:00
Christopher Kohlhoff
4cd27fffd4 Update io_context::executor_type to standard executor form. 2020-06-23 11:07:35 +10:00
Christopher Kohlhoff
e61acbcb42 Add static_thread_pool (as thread_pool in standard executor form). 2020-06-23 11:07:35 +10:00
Christopher Kohlhoff
b47fdccb6a Add "asio/execution.hpp" convenience header. 2020-06-23 10:25:15 +10:00
Christopher Kohlhoff
ed4530ef79 Add execution::context_as property adapter. 2020-06-23 10:25:15 +10:00
Christopher Kohlhoff
b975aa75c8 Add execution::prefer_only property adapter. 2020-06-23 10:25:15 +10:00
Christopher Kohlhoff
6505157d2e Add execution::any_executor. 2020-06-23 10:25:15 +10:00
Christopher Kohlhoff
a13604cf8d Add execution::context property. 2020-06-22 22:48:33 +10:00
Christopher Kohlhoff
b88245283a Add execution::occupancy property. 2020-06-22 22:48:33 +10:00
Christopher Kohlhoff
8adc6d9096 Add execution::allocator property. 2020-06-22 22:48:33 +10:00
Christopher Kohlhoff
47b5692553 Add execution::bulk_guarantee property. 2020-06-22 22:48:33 +10:00
Christopher Kohlhoff
4a899105c6 Add execution::blocking_adaptation property. 2020-06-22 22:48:33 +10:00
Christopher Kohlhoff
d0ffa51c86 Add execution::relationship property. 2020-06-22 22:48:33 +10:00
Christopher Kohlhoff
ead0aa154f Add execution::mapping property. 2020-06-22 22:48:33 +10:00
Christopher Kohlhoff
1b6018accd Add execution::outstanding_work property. 2020-06-22 22:48:33 +10:00
Christopher Kohlhoff
535b6210e8 Add execution::blocking property. 2020-06-22 22:48:33 +10:00
Christopher Kohlhoff
a0ca290c6d Add execution::executor concept and execution::is_executor trait. 2020-06-22 22:48:33 +10:00
Christopher Kohlhoff
ec3ec3ec16 Add execution::execute() customisation point object. 2020-06-22 22:48:33 +10:00
Christopher Kohlhoff
f14dbd716c Add execution::invocable_archetype. 2020-06-22 22:42:41 +10:00
Christopher Kohlhoff
7bdae05db9 Add properties implementation. 2020-06-22 20:04:50 +10:00
Christopher Kohlhoff
62102ebb59 Don't treat gcc 6 builds as supporting c++14. 2020-06-22 19:10:48 +10:00
Christopher Kohlhoff
d2c55c2152 Add ability to run function templates as tests. 2020-06-22 19:10:48 +10:00
Christopher Kohlhoff
ebd426cd36 Fix copy/paste errors in "Networking TS compatibility" docs. 2020-06-22 19:10:48 +10:00
Christopher Kohlhoff
5a30d4c939 Fix compile error on MSVC 2017. 2020-06-22 19:02:24 +10:00
Christopher Kohlhoff
260afe3a7b Don't default the IoExecutor in detail::handler_work<>. 2020-06-19 20:43:22 +10:00
Christopher Kohlhoff
ccdf9fa3d4 Change detail::completion_handler<> to use an I/O executor. 2020-06-19 20:43:22 +10:00
Christopher Kohlhoff
6080760b80 Test for native I/O executors in detail::handler_work<>.
The detail::io_object_executor wrapper has been removed, and the job of
detecting, and optimising for, native I/O executors is now performed
directly in the detail::handler_work implementation.
2020-06-19 20:43:22 +10:00
Christopher Kohlhoff
a5401f7eee Change detail::handler_work<> to use an RAII-based approach. 2020-06-19 11:32:49 +10:00
Christopher Kohlhoff
f64f916489 Avoid touching errors when we get a 0-length receive on a non-stream. 2020-06-15 17:54:01 +10:00
Christopher Kohlhoff
480a336189 Add single-buffer optimisation for descriptor read and write.
When we can determine at compile time that the user has supplied a
single buffer, use read/write rather than readv/writev, as the former
system calls can be faster.
2020-06-15 17:53:54 +10:00
Christopher Kohlhoff
75fd0ca1b7 Add single-buffer optimisation for recvfrom and sendto.
When we can determine at compile time that the user has supplied a
single buffer, use recvfrom/sendto rather than recvmsg/sendmsg, as the
former system calls can be faster.
2020-06-15 17:53:54 +10:00
Christopher Kohlhoff
cebecc56ae Remove unnecessary allocator_ member. 2020-06-15 17:15:48 +10:00
Christopher Kohlhoff
3b7d655cc9 On success, zero only the error_code value. 2020-06-15 17:15:48 +10:00
Christopher Kohlhoff
8077f65047 Use a cached success error code to avoid touching the category singleton. 2020-06-15 17:15:48 +10:00
Christopher Kohlhoff
8638b3539f Return earlier on success in send/receive and read/write operations. 2020-06-15 17:15:48 +10:00
Christopher Kohlhoff
288e378038 Access errno only when on the error path. 2020-06-15 17:15:48 +10:00
Christopher Kohlhoff
3582b06196 Add single-buffer optimisation for send and receive.
When we can determine at compile time that the user has supplied a
single buffer, use send/recv rather than sendmsg/recvmsg, as the former
system calls can be faster.
2020-06-12 11:17:44 +10:00
Christopher Kohlhoff
0687857ec1 Specify memory ordering when reference counting with standard atomics. 2020-06-12 10:50:04 +10:00
Christopher Kohlhoff
716ab8d22c Add some gcc 9 targets on travis. 2020-06-08 11:55:05 +10:00
Christopher Kohlhoff
d6c41e33e3 Explicitly disable copy construction in io_context and thread_pool. 2020-06-08 11:54:35 +10:00
Christopher Kohlhoff
0d5dc52c81 Use alternate boost download location. 2020-06-08 10:49:04 +10:00
Christopher Kohlhoff
16695f2777 Add --with-boost=system option.
This configure option causes the build to define the necessary
preprocessor macros to use boost, but does not alter the include or
library paths.
2020-06-08 10:25:09 +10:00
Christopher Kohlhoff
67fc1fed38 Mark the asio_handler_allocate/deallocate hooks as deprecated.
Compiling an application with ASIO_NO_DEPRECATED will now trigger a
compile error if any handler implements the asio_handler_allocate or
asio_handler_deallocate hooks.
2020-06-07 12:13:20 +10:00
Christopher Kohlhoff
81964e87f4 Mark the asio_handler_invoke hook as deprecated.
Compiling an application with ASIO_NO_DEPRECATED will now trigger a
compile error if any handler implements the asio_handler_invoke hook.
2020-06-07 12:13:20 +10:00
Christopher Kohlhoff
8c4d117a41 Update socks4 example to use non-deprecated resolver interface. 2020-06-06 16:52:58 +10:00
Christopher Kohlhoff
73625e8e32 Another tutorial fix to reflect current resolver API. 2020-06-03 21:31:50 +10:00
Christopher Kohlhoff
cfa430c8de Fix examples in read_until() documentation. 2020-06-03 19:22:10 +10:00
Christopher Kohlhoff
91df1a56d3 Changes for clang-based Embarcadero C++ compilers. 2020-06-03 19:21:34 +10:00
Christopher Kohlhoff
62d0cf33a7 Add unit test for thread_pool. 2020-05-30 12:10:47 +10:00
Christopher Kohlhoff
8f48589ff1 Add missing .gitignore entry for io_context_strand. 2020-05-30 12:03:32 +10:00