Classes | |
class | boost::afio::current_dispatcher_guard |
Functions | |
BOOST_AFIO_DECL dispatcher_ptr | boost::afio::current_dispatcher (option< dispatcher_ptr > new_dispatcher=empty) |
Retrieves the currently set async_file_io_dispatcher for this thread, optionally setting it to a new dispatcher. | |
BOOST_AFIO_DECL outcome < dispatcher_ptr > | boost::afio::make_dispatcher (std::string uri="file : / / /", file_flags flagsforce=file_flags::none, file_flags flagsmask=file_flags::none, std::shared_ptr< thread_source > threadpool=process_threadpool()) noexcept |
Instatiates the best available async_file_io_dispatcher implementation for this system for the given uri. | |
future | boost::afio::depends (future<> precondition, future<> out) |
Make ready a future after a precondition future readies. |
BOOST_AFIO_DECL dispatcher_ptr boost::afio::current_dispatcher | ( | option< dispatcher_ptr > | new_dispatcher = empty | ) |
Retrieves the currently set async_file_io_dispatcher for this thread, optionally setting it to a new dispatcher.
new_dispatcher | The new async_file_io_dispatcher to set. |
BOOST_AFIO_DECL outcome<dispatcher_ptr> boost::afio::make_dispatcher | ( | std::string | uri = "file : / / /" , |
file_flags | flagsforce = file_flags::none , |
||
file_flags | flagsmask = file_flags::none , |
||
std::shared_ptr< thread_source > | threadpool = process_threadpool() |
||
) |
Instatiates the best available async_file_io_dispatcher implementation for this system for the given uri.
Note that the number of threads in the threadpool supplied is the maximum non-async op queue depth (e.g. file opens, closes etc.). For fast SSDs, there isn't much gain after eight-sixteen threads, so the process threadpool is set to eight by default. For slow hard drives, or worse, SANs, a queue depth of 64 or higher might deliver significant benefits.
URIs currently supported by AFIO:
uri | Where to open the dispatcher upon. |
flagsforce | The flags to bitwise OR with any opened file flags. Used to force on certain flags. |
flagsmask | The flags to bitwise AND with any opened file flags. Used to force off certain flags. |
threadpool | The threadpool instance to use for asynchronous dispatch. |
future boost::afio::depends | ( | future<> | precondition, |
future<> | out | ||
) |
January, 2014 |
Copyright © 2013-2014 Niall Douglas, Cork, Ireland Copyright © 2013 Paul Kirth, California |