Ensure the loop callback is scheduled when the ready queue is not empty
authorBrian Watling <bwatling@fb.com>
Wed, 15 Apr 2015 06:04:34 +0000 (23:04 -0700)
committerAlecs King <int@fb.com>
Mon, 27 Apr 2015 23:40:11 +0000 (16:40 -0700)
commitd8cd7bc7a0c011d81037317581727dc9de22e28f
treecd9c4237024eea743624f97324b7d2499902b0bf
parent30d8a3d6880ed3c18c3b4cd49debf832a6bd6902
Ensure the loop callback is scheduled when the ready queue is not empty

Summary: Previously we'd call ensureLoopScheduled() but it'd be a no-op since the loop was already scheduled. Delaying the call to ensureLoopScheduled() fixes the issue

Test Plan: unit tests (FiberManager.yieldTest fails without the changes to FiberManager-inl.h)

Reviewed By: andrii@fb.com

Subscribers: folly-diffs@, yfeldblum, chalfant

FB internal diff: D1993686

Signature: t1:1993686:1429070253:af933abbbbb33868a402f1d643e4e6f5fef1be83
folly/experimental/fibers/FiberManager-inl.h
folly/experimental/fibers/test/FibersTest.cpp