![]() |
Open CASCADE Technology Reference Manual 8.0.2
|
Deprecated compatibility alias. More...
Macros | |
| #define | Standard_DEPRECATED_STD(theMsg) |
| Marks a declaration as deprecated using the standard C++ [[deprecated]] attribute. Use this instead of Standard_DEPRECATED in contexts where only standard C++ attributes are grammatically valid, such as using-alias declarations: using OldName Standard_DEPRECATED_STD("msg") = NewName; MSVC rejects declspec(deprecated) and GCC/Clang reject __attribute((deprecated)) when placed between the alias name and the = token, so Standard_DEPRECATED cannot be used there. If macro OCCT_NO_DEPRECATED is defined, Standard_DEPRECATED_STD is defined empty. | |
Variables | |
| class Standard_Mutex is | deprecated |
| Mutex: a class to synchronize access to shared data. | |
Deprecated compatibility alias.
| #define Standard_DEPRECATED_STD | ( | theMsg | ) |
Marks a declaration as deprecated using the standard C++ [[deprecated]] attribute. Use this instead of Standard_DEPRECATED in contexts where only standard C++ attributes are grammatically valid, such as using-alias declarations: using OldName Standard_DEPRECATED_STD("msg") = NewName; MSVC rejects declspec(deprecated) and GCC/Clang reject __attribute((deprecated)) when placed between the alias name and the = token, so Standard_DEPRECATED cannot be used there. If macro OCCT_NO_DEPRECATED is defined, Standard_DEPRECATED_STD is defined empty.
| class Standard_Mutex is deprecated |
Mutex: a class to synchronize access to shared data.
This is simple encapsulation of tools provided by the operating system to synchronize access to shared data from threads within one process.
Current implementation is very simple and straightforward; it is just a wrapper around POSIX pthread library on UNIX/Linux, and CRITICAL_SECTIONs on Windows NT. It does not provide any advanced functionality such as recursive calls to the same mutex from within one thread (such call will freeze the execution).
Note that all the methods of that class are made inline, in order to keep maximal performance. This means that a library using the mutex might need to be linked to threads library directly.
The typical use of this class should be as follows:
Note that this class provides one feature specific to Open CASCADE: safe unlocking the mutex when signal is raised and converted to OCC exceptions (Note that with current implementation of this functionality on UNIX and Linux, C longjumps are used for that, thus destructors of classes are not called automatically).
To use this feature, call RegisterCallback() after Lock() or successful TryLock(), and UnregisterCallback() before Unlock() (or use Sentry classes).