Home | Trees | Indices | Help |
---|
|
The necessary class and decorators for interface and module
Copyright: (c) 2011 hackmeeting http://sindominio.net/hackmeeting
Author: Ruben Pollan
Organization: hackmeeting http://sindominio.net/hackmeeting
Contact: meskio@sindominio.net
License: This program is free software; you can redistribute it and/or modify it under the terms of the Do What The Fuck You Want To Public License, Version 2, as published by Sam Hocevar. See http://sam.zoy.org/projects/COPYING.WTFPL for more details.
|
|||
Complement Empty class mented to be inhered by interface and module |
|
|||
|
|
Decorator that adds a lock to a method It decorates methods of child classes of Complement, usually interface or module. Adds the use of a locker (mutex) to the method, so the access to the class data is thread safe. >>> from emma.complement import use_lock >>> class myModule(Module): ... @use_lock ... def run(self): ... self.var = 0 ... ... @use_lock ... def inc(self): ... self.var += 1 |
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Sun Feb 16 00:00:06 2014 | http://epydoc.sourceforge.net |