projects
/
folly.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1470961
)
Allow access to a FiberManager's currently running fiber
author
Brian Watling
<bwatling@fb.com>
Mon, 20 Jul 2015 18:46:02 +0000
(11:46 -0700)
committer
Sara Golemon
<sgolemon@fb.com>
Mon, 20 Jul 2015 19:26:33 +0000
(12:26 -0700)
Summary: Allow access to a FiberManager's currently running fiber
Reviewed By: @alikhtarov, @andriigrynenko
Differential Revision:
D2257201
folly/experimental/fibers/FiberManager.h
patch
|
blob
|
history
diff --git
a/folly/experimental/fibers/FiberManager.h
b/folly/experimental/fibers/FiberManager.h
index a29c6c2f56069fcaa6a1393cc3d1cf7553b0fe4a..fc8890696a9d241cef6316c372da13f42f9895d2 100644
(file)
--- a/
folly/experimental/fibers/FiberManager.h
+++ b/
folly/experimental/fibers/FiberManager.h
@@
-224,6
+224,13
@@
class FiberManager : public ::folly::Executor {
*/
bool hasActiveFiber() const;
+ /**
+ * @return The currently running fiber or null if no fiber is executing.
+ */
+ Fiber* currentFiber() const {
+ return currentFiber_;
+ }
+
/**
* @return What was the most observed fiber stack usage (in bytes).
*/