VR-Forces 5.0.3 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
netInterfaceParallelLock.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2021 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
7 
8 #pragma once
9 
11 #include <tbb/spin_rw_mutex.h>
12 #include <string>
13 
14 namespace makVrf
15 {
17  {
18  public:
20 
21  DtNetInterfaceParallelLock& acquire(const std::string&, tbb::spin_rw_mutex&, bool write = true);
22 
24  DtNetInterfaceParallelLock& writeLockAcquire(const std::string&, tbb::spin_rw_mutex&);
25 
26  void upgrade_to_writer();
27  void downgrade_to_reader();
28  void release();
29 
31  static void SetUsingParallelPublishing(bool);
32  static bool UsingParallelPublishing();
33 
34  protected:
35  tbb::spin_rw_mutex::scoped_lock myLock;
37  std::string myArea;
39  };
40 
42  {
43  public:
46 
47  void acquire(tbb::spin_rw_mutex&, bool write = true);
48  void upgrade_to_writer();
49  void downgrade_to_reader();
50  void release();
51 
52  protected:
54  bool myReleased;
55  };
56 }
57 
58 #include "vrlinkNetworkInterface/netInterfaceParallelLock.inl"
Definition: netInterfaceParallelLock.h:16
bool myReleased
Definition: netInterfaceParallelLock.h:54
DtNetInterfaceParallelLock & myLock
Definition: netInterfaceParallelLock.h:53
Definition: netInterfaceParallelLock.h:41
bool myForceWriteLocked
Definition: netInterfaceParallelLock.h:38
static bool theUsingParallelPublishing
Definition: netInterfaceParallelLock.h:36
tbb::spin_rw_mutex::scoped_lock myLock
Definition: netInterfaceParallelLock.h:35
std::string myArea
Definition: netInterfaceParallelLock.h:37

Document ID: Generated on Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)