souffle  2.0.2-371-g6315b36
Data Structures | Public Member Functions
souffle::OptimisticReadWriteLock Class Reference

A 'sequential' non-locking implementation for an optimistic r/w lock. More...

#include <ParallelUtil.h>

Collaboration diagram for souffle::OptimisticReadWriteLock:
Collaboration graph

Data Structures

class  Lease
 

Public Member Functions

void abort_write ()
 
bool end_read (const Lease &)
 
void end_write ()
 
bool is_write_locked () const
 
 OptimisticReadWriteLock ()=default
 
Lease start_read ()
 
void start_write ()
 
bool try_start_write ()
 
bool try_upgrade_to_write (const Lease &)
 
bool validate (const Lease &)
 

Detailed Description

A 'sequential' non-locking implementation for an optimistic r/w lock.

Definition at line 526 of file ParallelUtil.h.

Constructor & Destructor Documentation

◆ OptimisticReadWriteLock()

souffle::OptimisticReadWriteLock::OptimisticReadWriteLock ( )
default

Member Function Documentation

◆ abort_write()

void souffle::OptimisticReadWriteLock::abort_write ( )
inline

Definition at line 554 of file ParallelUtil.h.

554 {}

◆ end_read()

bool souffle::OptimisticReadWriteLock::end_read ( const Lease )
inline

Definition at line 540 of file ParallelUtil.h.

540  {
541  return true;
542  }

◆ end_write()

void souffle::OptimisticReadWriteLock::end_write ( )
inline

Definition at line 556 of file ParallelUtil.h.

556 {}

◆ is_write_locked()

bool souffle::OptimisticReadWriteLock::is_write_locked ( ) const
inline

Definition at line 558 of file ParallelUtil.h.

558  {
559  return true;
560  }

◆ start_read()

Lease souffle::OptimisticReadWriteLock::start_read ( )
inline

Definition at line 532 of file ParallelUtil.h.

532  {
533  return Lease();
534  }

◆ start_write()

void souffle::OptimisticReadWriteLock::start_write ( )
inline

Definition at line 544 of file ParallelUtil.h.

544 {}

◆ try_start_write()

bool souffle::OptimisticReadWriteLock::try_start_write ( )
inline

Definition at line 546 of file ParallelUtil.h.

546  {
547  return true;
548  }

◆ try_upgrade_to_write()

bool souffle::OptimisticReadWriteLock::try_upgrade_to_write ( const Lease )
inline

Definition at line 550 of file ParallelUtil.h.

550  {
551  return true;
552  }

◆ validate()

bool souffle::OptimisticReadWriteLock::validate ( const Lease )
inline

Definition at line 536 of file ParallelUtil.h.

536  {
537  return true;
538  }

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