Changed LICENSE. Now referenced to web site and file on project root directory
[anna.git] / include / anna / core / mt / NRMutex.hpp
1 // ANNA - Anna is Not Nothingness Anymore                                                         //
2 //                                                                                                //
3 // (c) Copyright 2005-2015 Eduardo Ramos Testillano & Francisco Ruiz Rayo                         //
4 //                                                                                                //
5 // See project site at http://redmine.teslayout.com/projects/anna-suite                           //
6 // See accompanying file LICENSE or copy at http://www.teslayout.com/projects/public/anna.LICENSE //
7
8
9 #ifndef anna_core_mt_NRMutex_hpp
10 #define anna_core_mt_NRMutex_hpp
11
12 #include <anna/core/mt/Mutex.hpp>
13
14 namespace anna {
15
16 /**
17    Clase para implementar secciones criticas no-reentrantes. El uso general sera el siguiente:
18
19    \code
20       mutex.lock ();
21
22       try {
23        <implementacion de la seccion critica>
24
25         mutex.unlock ();
26       }
27       catch (Exception&) {
28         mutex.unlock ();
29         .... tratamiento de la excepcion ...
30       }
31    \endcode
32
33    La funcionalidad de esta clase solo estara disponible en aplicaciones multithread.
34
35    @see anna::Guard
36    @see anna::Thread
37    @see anna::Semaphore
38 */
39 class NRMutex : public Mutex {
40 public:
41   /**
42     Constructor.
43   */
44   NRMutex() : Mutex(Mode::Strict) { ; }
45 };
46
47 } //namespace anna
48
49 #endif