Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/llfio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com>2021-04-20 13:44:21 +0300
committerNiall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com>2021-04-20 13:44:21 +0300
commit565f27555d13ce2a37346d838f32e03e1972aac1 (patch)
tree791789e4ee01aafa8d468f7315b35c88eb1f9cf2 /example
parent6735fabda8723111d687cc6bab54e73fad666131 (diff)
Remove all remaining mentions of async_file_handle (issue #78).
Diffstat (limited to 'example')
-rw-r--r--example/use_cases.cpp25
1 files changed, 0 insertions, 25 deletions
diff --git a/example/use_cases.cpp b/example/use_cases.cpp
index 3fb5cc1e..334e1cc6 100644
--- a/example/use_cases.cpp
+++ b/example/use_cases.cpp
@@ -307,31 +307,6 @@ void sparse_array()
}
#endif
-#if LLFIO_HAVE_COROUTINES
-std::future<void> coroutine_write()
-{
- //! [coroutine_write]
- namespace llfio = LLFIO_V2_NAMESPACE;
-
- // Create an asynchronous file handle
- llfio::io_service service;
- llfio::async_file_handle fh =
- llfio::async_file(service, {}, "testfile.txt",
- llfio::async_file_handle::mode::write,
- llfio::async_file_handle::creation::if_needed).value();
-
- // Resize it to 1024 bytes
- truncate(fh, 1024).value();
-
- // Begin to asynchronously write "hello world" into the file at offset 0,
- // suspending execution of this coroutine until completion and then resuming
- // execution. Requires the Coroutines TS.
- alignas(4096) char buffer[] = "hello world";
- co_await co_write(fh, 0, { { reinterpret_cast<llfio::byte *>(buffer), sizeof(buffer) } }).value();
- //! [coroutine_write]
-}
-#endif
-
int main()
{
return 0;