X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=folly%2Ffutures%2FQueuedImmediateExecutor.h;h=b98047a04e0d0cd891557386ce3adbccbde549f7;hb=ca0e432d0fbd3140e4eb172641588ffdbe30b439;hp=15e2513f98d8fb2e7b8a99624fd52e5ba4e458bc;hpb=275ca94d04e44f28cfa411668eb1c1dd8db90b80;p=folly.git diff --git a/folly/futures/QueuedImmediateExecutor.h b/folly/futures/QueuedImmediateExecutor.h index 15e2513f..b98047a0 100644 --- a/folly/futures/QueuedImmediateExecutor.h +++ b/folly/futures/QueuedImmediateExecutor.h @@ -1,5 +1,5 @@ /* - * Copyright 2015 Facebook, Inc. + * Copyright 2017 Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,7 +27,13 @@ namespace folly { */ class QueuedImmediateExecutor : public Executor { public: - void add(Func) override; + /// There's really only one queue per thread, no matter how many + /// QueuedImmediateExecutor objects you may have. + static void addStatic(Func); + + void add(Func func) override { + addStatic(std::move(func)); + } }; -} // folly +} // namespace folly