Commit 32d696cb authored by Martin Martin's avatar Martin Martin Committed by facebook-github-bot-0

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
parent 1aa61f23
...@@ -47,6 +47,8 @@ constexpr size_t kMaxInUse = 100; ...@@ -47,6 +47,8 @@ constexpr size_t kMaxInUse = 100;
/** /**
* A cache for kNumGuarded stacks of a given size * A cache for kNumGuarded stacks of a given size
*
* Thread safe.
*/ */
class StackCache { class StackCache {
public: public:
...@@ -176,6 +178,10 @@ class CacheManager { ...@@ -176,6 +178,10 @@ class CacheManager {
} }
}; };
/*
* RAII Wrapper around a StackCache that calls
* CacheManager::giveBack() on destruction.
*/
class StackCacheEntry { class StackCacheEntry {
public: public:
explicit StackCacheEntry(size_t stackSize) explicit StackCacheEntry(size_t stackSize)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment