From: Martin Martin Date: Tue, 2 Feb 2016 22:12:48 +0000 (-0800) Subject: Add some quick comments about folly::fiber implementation classes. X-Git-Tag: deprecate-dynamic-initializer~105 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=32d696cb0c45ebeb917a2d3f069248b0bb6d33b8;p=folly.git 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 --- 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)