Create a super rough prototype of B3
[WebKit-https.git] / Source / WTF / wtf / SharedTask.h
index 1ff569c..5805918 100644 (file)
@@ -79,6 +79,11 @@ public:
     {
     }
 
+    SharedTaskFunctor(Functor&& functor)
+        : m_functor(WTF::move(functor))
+    {
+    }
+
 private:
     ResultType run(ArgumentTypes&&... arguments) override
     {
@@ -110,6 +115,11 @@ Ref<SharedTask<FunctionType>> createSharedTask(const Functor& functor)
 {
     return adoptRef(*new SharedTaskFunctor<FunctionType, Functor>(functor));
 }
+template<typename FunctionType, typename Functor>
+Ref<SharedTask<FunctionType>> createSharedTask(Functor&& functor)
+{
+    return adoptRef(*new SharedTaskFunctor<FunctionType, Functor>(WTF::move(functor)));
+}
 
 } // namespace WTF