Commit graph

2 commits

Author SHA1 Message Date
Lewis Baker
a34527617d Remove io_context and just use io_service& directly.
Added io_work_scope RAII class to help with scoped lifetime of
io_service event loop.

Having io_context always increment the ref-count of active I/O
operations whenever passed by-value to a function seems like
unnecessary atomic operations when compared to selected usages of
io_work_scope which generally only need creation for top-level
operations.
2017-06-25 22:03:46 +09:30
Lewis Baker
8cf10ce184 Add async file I/O support for Win32 platform.
- Adds file, readable_file, writable_file, read_only_file,
  write_only_file and read_write_file classes.
- Adds file_share_mode, file_open_mode, file_buffering_mode enums.
- Supports async read/write but only synchronous open for now.
- Removes support for VS 2015 since implementation makes use of
  std::optional which is only available in VS 2017.
2017-05-27 21:26:59 +09:30