JUCE-7.0.12-0-g4f43011b96 JUCE-7.0.12-0-g4f43011b96
JUCE — C++ application framework with suport for VST, VST3, LV2 audio plug-ins

« « « Anklang Documentation
Loading...
Searching...
No Matches
Public Member Functions | List of all members
juce::InterProcessLock::ScopedLockType Class Reference

Automatically locks and unlocks an InterProcessLock object. More...

#include "juce_InterProcessLock.h"

Public Member Functions

 ScopedLockType (InterProcessLock &l)
 Creates a scoped lock.
 
 ~ScopedLockType ()
 Destructor.
 
bool isLocked () const noexcept
 Returns true if the InterProcessLock was successfully locked.
 

Detailed Description

Automatically locks and unlocks an InterProcessLock object.

This works like a ScopedLock, but using an InterprocessLock rather than a CriticalSection.

See also
ScopedLock

Definition at line 71 of file juce_InterProcessLock.h.

Constructor & Destructor Documentation

◆ ScopedLockType()

juce::InterProcessLock::ScopedLockType::ScopedLockType ( InterProcessLock l)
explicit

Creates a scoped lock.

As soon as it is created, this will lock the InterProcessLock, and when the ScopedLockType object is deleted, the InterProcessLock will be unlocked.

Note that since an InterprocessLock can fail due to errors, you should check isLocked() to make sure that the lock was successful before using it.

Make sure this object is created and deleted by the same thread, otherwise there are no guarantees what will happen! Best just to use it as a local stack object, rather than creating one with the new() operator.

Definition at line 88 of file juce_InterProcessLock.h.

◆ ~ScopedLockType()

juce::InterProcessLock::ScopedLockType::~ScopedLockType ( )

Destructor.

The InterProcessLock will be unlocked when the destructor is called.

Make sure this object is created and deleted by the same thread, otherwise there are no guarantees what will happen!

Definition at line 97 of file juce_InterProcessLock.h.

Member Function Documentation

◆ isLocked()

bool juce::InterProcessLock::ScopedLockType::isLocked ( ) const
noexcept

Returns true if the InterProcessLock was successfully locked.

Definition at line 100 of file juce_InterProcessLock.h.


The documentation for this class was generated from the following file: