# Poco

# class NullMutex

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

## Description

A NullMutex is an simple 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 to switch between thread-safe and not thread-safe implementations.

## 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.