VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
dataGate.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2023 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
6 #pragma once
7 
9 #include <tbb/mutex.h>
10 
11 #include <boost/signals2.hpp>
12 
13 namespace makVrf
14 {
19  {
20  public:
23  DtGateLock();
24 
26  virtual ~DtGateLock();
27 
30  bool wait(std::chrono::milliseconds timeout);
31 
33  void allowAdvance();
34 
36  void disallowAdvance();
37 
39  bool lock(double timeout = -1);
41  void unlock();
42 
44  static boost::signals2::signal<void ()> signal_gateLocked;
46  static boost::signals2::signal<void ()> signal_gateUnlocked;
47  static boost::signals2::signal<void()> signal_gateAboutToBeUnlocked;
48 
49  protected:
51  tbb::mutex::scoped_lock myLock;
53  bool myLocked = false;
54  };
55 }
static boost::signals2::signal< void()> signal_gateLocked
Signal emitted when the gate lock is acquired.
Definition: dataGate.h:44
tbb::mutex::scoped_lock myLock
Scoped lock wrapping the shared gate mutex.
Definition: dataGate.h:51
static boost::signals2::signal< void()> signal_gateUnlocked
Signal emitted when the gate lock is released.
Definition: dataGate.h:46
If you need access to data in the main thread outside of the advance frame, use this lock (with the l...
Definition: dataGate.h:18
static boost::signals2::signal< void()> signal_gateAboutToBeUnlocked
Definition: dataGate.h:47
#define DT_DLL_vrfStateData
This file is used to determine how to build Disable inconsistent dll linkage warning Visual Studio 6...
Definition: vrfStateDataDefines.h:29

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)