# Poco

# class NullMutex

Library: Foundation
Package: Threading
Header: Poco/Mutex.h

## Description

A NullMutex is an empty mutex implementation which performs no locking at all. Useful in policy driven design where the type of mutex used can be now a template parameter allowing the user to switch between thread-safe and not thread-safe depending on his need Works with the ScopedLock class

## Member Summary

Member Functions: lock, tryLock, unlock

## Types

### ScopedLock

typedef Poco::ScopedLock < NullMutex > ScopedLock;

## Constructors

### NullMutex

NullMutex();

Creates the NullMutex.

## Destructor

### ~NullMutex

~NullMutex();

Destroys the NullMutex.

## Member Functions

### lock

void lock();

Does nothing.

### lock

void lock(
long
);

Does nothing.

### tryLock

bool tryLock();

Does nothing and always returns true.

### tryLock

bool tryLock(
long
);

Does nothing and always returns true.

### unlock

void unlock();

Does nothing.