Skip to content

Commit

Permalink
Reset high stack watermark when repurposing fiber
Browse files Browse the repository at this point in the history
Summary: Reset high stack watermark when a fiber object is placed back in the available pool.

Differential Revision: D49509201

fbshipit-source-id: 3ffdd8e59c2a6729c8e7cead05e883a500ec80d2
  • Loading branch information
Emanuele Altieri authored and facebook-github-bot committed Sep 22, 2023
1 parent 0ddc8d1 commit b1a8fc4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions folly/fibers/FiberManagerInternal-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ inline void FiberManager::runReadyFiber(Fiber* fiber) {

if (fibersPoolSize_ < options_.maxFibersPoolSize ||
options_.fibersPoolResizePeriodMs > 0) {
fiber->fiberStackHighWatermark_ = 0;
fibersPool_.push_front(*fiber);
++fibersPoolSize_;
} else {
Expand Down

0 comments on commit b1a8fc4

Please sign in to comment.