mirror of
https://github.com/vimpunk/mio.git
synced 2025-12-06 08:46:51 +08:00
Update README.md and example.cpp
This commit is contained in:
parent
50bfe8087a
commit
6570541b25
@ -113,8 +113,8 @@ int main()
|
||||
const int answer_index = rw_mmap.size() / 2;
|
||||
rw_mmap[answer_index] = 42;
|
||||
|
||||
// Don't forget to flush changes to disk, which is NOT done by the destructor for
|
||||
// more explicit control of this potentially expensive operation.
|
||||
// We can explicitly flush changes to disk, but this is already done by the
|
||||
// destructor.
|
||||
rw_mmap.sync(error);
|
||||
if (error) { return handle_error(error); }
|
||||
|
||||
|
||||
@ -49,8 +49,8 @@ int main()
|
||||
const int answer_index = rw_mmap.size() / 2;
|
||||
rw_mmap[answer_index] = 42;
|
||||
|
||||
// Don't forget to flush changes to disk, which is NOT done by the destructor for
|
||||
// more explicit control of this potentially expensive operation.
|
||||
// We can explicitly flush changes to disk, but this is already done by the
|
||||
// destructor.
|
||||
rw_mmap.sync(error);
|
||||
if (error) { return handle_error(error); }
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user