Introduce LifoSem
authorMarc Celani <marccelani@fb.com>
Thu, 17 Apr 2014 00:19:31 +0000 (17:19 -0700)
committerSara Golemon <sgolemon@fb.com>
Fri, 18 Apr 2014 19:04:15 +0000 (12:04 -0700)
commit7fbec7196afc262f23dd26431441f5c231d4d801
treed8be9f333f524a6452cdf23cc793b56e5e0e220b
parent59c7c8eafcd986b169fecaaff870d2d29267d029
Introduce LifoSem

Summary: A LIFO semaphore is useful for building a thread pool because we can keep cpu caches warmer by continually reusing the last used thread. This diff introduces a LIFO semaphore to folly.

Test Plan: unit tests

Reviewed By: davejwatson@fb.com

FB internal diff: D1280405
folly/LifoSem.cpp [new file with mode: 0644]
folly/LifoSem.h [new file with mode: 0644]
folly/test/LifoSemTests.cpp [new file with mode: 0644]