/****************************************************************************** * Copyright (C) Ultraleap, Inc. 2011-2021. * * * * Use subject to the terms of the Apache License 2.0 available at * * http://www.apache.org/licenses/LICENSE-2.0, or another agreement * * between Ultraleap and you, your company or other organization. * ******************************************************************************/ #pragma once #include "LeapAsync.h" #include "Async/Async.h" TFuture FLeapAsync::RunLambdaOnBackGroundThread(TFunction InFunction) { return Async(EAsyncExecution::Thread, InFunction); } TFuture FLeapAsync::RunLambdaOnBackGroundThreadPool(TFunction InFunction) { return Async(EAsyncExecution::ThreadPool, InFunction); } FGraphEventRef FLeapAsync::RunShortLambdaOnGameThread(TFunction InFunction) { return FFunctionGraphTask::CreateAndDispatchWhenReady(InFunction, TStatId(), nullptr, ENamedThreads::GameThread); }