C/C++ Reference
ThreadReleaseLock Struct Reference

This class provides an easy and less error prone way of temporarily releasing a locked mutex. More...

#include <ThreadLib.h>

List of all members.

Public Member Functions

 ThreadReleaseLock (struct HttpRequest *req)
 Temporarily unlock a locked mutex from within a resource.
 ThreadReleaseLock (ThreadMutex &m)
 Temporarily unlock a locked mutex.
 ThreadReleaseLock (ThreadMutex *m)
 Temporarily unlock a locked mutex.
 ThreadReleaseLock (ThreadLock &tl)
 Temporarily unlock a locked mutex.
 ThreadReleaseLock (ThreadLock *tl)
 Temporarily unlock a locked mutex.
 ~ThreadReleaseLock ()
 Lock the temporarily unlock mutex.

Detailed Description

This class provides an easy and less error prone way of temporarily releasing a locked mutex.

This class is the inverse of class ThreadLock.

    void // An HttpPage service function
    myPagePage::service(HttpPage* page,
                         HttpRequest* request,
                         HttpResponse* response)
    {
       //Normal web-server calls here
       { ThreadReleaseLock rlock(req);
            //Non web-server calls here
       }
       //Normal web-server calls here
    }
See also:
ThreadMutex ThreadLock