QueuedImmediateExecutor tweaks
authorYedidya Feldblum <yfeldblum@fb.com>
Thu, 23 Nov 2017 19:59:32 +0000 (11:59 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Thu, 23 Nov 2017 20:05:14 +0000 (12:05 -0800)
commitc45f2aa595428c80bbd34b70925c236f83dc6231
tree5159ec33a1793decb8dd0b22041f30d7ec8ff257
parent6612bf09e56e819cb76efd0956fdca3dd12ec514
QueuedImmediateExecutor tweaks

Summary:
[Folly] `QueuedImmediateExecutor` tweaks.

* Add a leaky meyers singleton instance.
* Make the thread-local queue an instance variable. Callers which want the singleton thread-local queue can use the singleton executor instance instance, for the same effect.
* Simplify the body of `add`, and perform the thread-local lookup only once per invocation.

Reviewed By: djwatson

Differential Revision: D6399067

fbshipit-source-id: 03904885a70c4b943141bd83868414d27232fd6a
folly/executors/QueuedImmediateExecutor.cpp
folly/executors/QueuedImmediateExecutor.h