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>2018-04-08 01:44:51 +0300
committerNiall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com>2018-04-08 01:44:51 +0300
commit60cce3d8b8cce953c67ecb22a082ad4d4c1d3aa9 (patch)
tree4dde97f506595c4590a6e4b49eacad82238b58fd /release_notes.md
parentd0c561c7d38af021411c41a0161188a241364ac6 (diff)
Replace single buffer convenience overloads of read() and write() with initialiser list ones instead.
Make an example of use cases, and use those snippets in the docs
Diffstat (limited to 'release_notes.md')
-rw-r--r--release_notes.md38
1 files changed, 2 insertions, 36 deletions
diff --git a/release_notes.md b/release_notes.md
index 5e606132..a45ebbb9 100644
--- a/release_notes.md
+++ b/release_notes.md
@@ -38,44 +38,10 @@ Examples of use:
<table width="100%" border="0" cellpadding="4">
<tr>
<td width="50%" valign="top">
-\code
-namespace afio = AFIO_V2_NAMESPACE;
-
-// Make me a 1 trillion element sparsely allocated integer array!
-afio::mapped_file_handle mfh = afio::mapped_temp_inode().value();
-
-// On an extents based filing system, doesn't actually allocate any physical
-// storage but does map approximately 4Tb of all bits zero data into memory
-mfh.truncate(1000000000000ULL*sizeof(int));
-
-// Create a typed view of the one trillion integers
-afio::algorithm::mapped_view<int> one_trillion_int_array(mfh);
-
-// Write and read as you see fit, if you exceed physical RAM it'll be paged out
-one_trillion_int_array[0] = 5;
-one_trillion_int_array[999999999999ULL] = 6;
-\endcode
+\snippet sparse_array
</td>
<td width="50%" valign="top">
-\code
-namespace afio = AFIO_V2_NAMESPACE;
-
-// Create an asynchronous file handle
-afio::io_service service;
-afio::async_file_handle fh =
- afio::async_file(service, {}, "testfile.txt",
- afio::async_file_handle::mode::write,
- afio::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, {{{buffer, sizeof(buffer)}}, 0}).value();
-\endcode
+\snippet coroutine_write
</td>
</tr>
</table>