Add some quick comments about folly::fiber implementation classes.
authorMartin Martin <mcm@fb.com>
Tue, 2 Feb 2016 22:12:48 +0000 (14:12 -0800)
committerfacebook-github-bot-0 <folly-bot@fb.com>
Tue, 2 Feb 2016 23:20:25 +0000 (15:20 -0800)
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

index 5595f14c21fd23046ccf1b8df98a8b73880057d8..c94e86fda9ba16584d2685b7de45df36946f9b4e 100644 (file)
@@ -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)