summaryrefslogtreecommitdiff
path: root/zen/scope_guard.h
diff options
context:
space:
mode:
Diffstat (limited to 'zen/scope_guard.h')
-rw-r--r--zen/scope_guard.h21
1 files changed, 10 insertions, 11 deletions
diff --git a/zen/scope_guard.h b/zen/scope_guard.h
index e97d3f0a..61422eb4 100644
--- a/zen/scope_guard.h
+++ b/zen/scope_guard.h
@@ -16,17 +16,16 @@
namespace zen
{
-//Scope Guard
-/*
- auto guardAio = zen::makeGuard<ScopeGuardRunMode::onExit>([&] { ::CloseHandle(hDir); });
- ...
- guardAio.dismiss();
-
-Scope Exit:
- ZEN_ON_SCOPE_EXIT(::CloseHandle(hDir));
- ZEN_ON_SCOPE_FAIL(UndoPreviousWork());
- ZEN_ON_SCOPE_SUCCESS(NotifySuccess());
-*/
+/* Scope Guard
+
+ auto guardAio = zen::makeGuard<ScopeGuardRunMode::onExit>([&] { ::CloseHandle(hDir); });
+ ...
+ guardAio.dismiss();
+
+ Scope Exit:
+ ZEN_ON_SCOPE_EXIT (CleanUp());
+ ZEN_ON_SCOPE_FAIL (UndoPreviousWork());
+ ZEN_ON_SCOPE_SUCCESS(NotifySuccess()); */
enum class ScopeGuardRunMode
{
bgstack15