openshot-audio  0.1.2
Classes | Public Member Functions | Friends | List of all members
InterProcessLock Class Reference

#include <juce_InterProcessLock.h>

Classes

class  Pimpl
 
class  ScopedLockType
 

Public Member Functions

 InterProcessLock (const String &name)
 
 ~InterProcessLock ()
 
bool enter (int timeOutMillisecs=-1)
 
void exit ()
 

Friends

struct ContainerDeletePolicy< Pimpl >
 

Detailed Description

Acts as a critical section which processes can use to block each other.

See also
CriticalSection

Constructor & Destructor Documentation

◆ InterProcessLock()

InterProcessLock::InterProcessLock ( const String name)
explicit

Creates a lock object.

Parameters
namea name that processes will use to identify this lock object

◆ ~InterProcessLock()

InterProcessLock::~InterProcessLock ( )

Destructor. This will also release the lock if it's currently held by this process.

Member Function Documentation

◆ enter()

bool InterProcessLock::enter ( int  timeOutMillisecs = -1)

Attempts to lock the critical section.

Parameters
timeOutMillisecshow many milliseconds to wait if the lock is already held by another process - a value of 0 will return immediately, negative values will wait forever
Returns
true if the lock could be gained within the timeout period, or false if the timeout expired.

◆ exit()

void InterProcessLock::exit ( )

Releases the lock if it's currently held by this process.

Friends And Related Function Documentation

◆ ContainerDeletePolicy< Pimpl >

friend struct ContainerDeletePolicy< Pimpl >
friend

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