From 960593fd5eedcc63632fe4e0e3b71ac4afc91d11 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Mon, 9 Dec 2019 11:37:36 -0500 Subject: DRTVWR-494: Add LLMainThreadTask to perform work on the main thread. If already running on the main thread, LLMaintThreadTask simply runs the work inline. Otherwise it queues it for the main thread using LLEventTimer, using std::future to retrieve the result. --- indra/llcommon/llmainthreadtask.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 indra/llcommon/llmainthreadtask.cpp (limited to 'indra/llcommon/llmainthreadtask.cpp') diff --git a/indra/llcommon/llmainthreadtask.cpp b/indra/llcommon/llmainthreadtask.cpp new file mode 100644 index 0000000000..e0d70cacd8 --- /dev/null +++ b/indra/llcommon/llmainthreadtask.cpp @@ -0,0 +1,22 @@ +/** + * @file llmainthreadtask.cpp + * @author Nat Goodspeed + * @date 2019-12-05 + * @brief Implementation for llmainthreadtask. + * + * $LicenseInfo:firstyear=2019&license=viewerlgpl$ + * Copyright (c) 2019, Linden Research, Inc. + * $/LicenseInfo$ + */ + +// Precompiled header +#include "linden_common.h" +// associated header +#include "llmainthreadtask.h" +// STL headers +// std headers +// external library headers +// other Linden headers + +// This file is required by our CMake integration-test machinery. It +// contributes no code to the viewer executable. -- cgit v1.2.3