From 32d696cb0c45ebeb917a2d3f069248b0bb6d33b8 Mon Sep 17 00:00:00 2001 From: Martin Martin Date: Tue, 2 Feb 2016 14:12:48 -0800 Subject: [PATCH] Add some quick comments about folly::fiber implementation classes. Summary: Add some quick comments about folly::fiber implementation classes. Reviewed By: yfeldblum Differential Revision: D2891940 fb-gh-sync-id: b9899bb63df03f32763f93a5dae8dff94c8e354e --- folly/experimental/fibers/GuardPageAllocator.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/folly/experimental/fibers/GuardPageAllocator.cpp b/folly/experimental/fibers/GuardPageAllocator.cpp index 5595f14c..c94e86fd 100644 --- a/folly/experimental/fibers/GuardPageAllocator.cpp +++ b/folly/experimental/fibers/GuardPageAllocator.cpp @@ -47,6 +47,8 @@ constexpr size_t kMaxInUse = 100; /** * A cache for kNumGuarded stacks of a given size + * + * Thread safe. */ class StackCache { public: @@ -176,6 +178,10 @@ class CacheManager { } }; +/* + * RAII Wrapper around a StackCache that calls + * CacheManager::giveBack() on destruction. + */ class StackCacheEntry { public: explicit StackCacheEntry(size_t stackSize) -- 2.34.1