Package multi :: Module memo
[hide private]
[frames] | no frames]

Source Code for Module multi.memo

 1  ############################################################################### 
 2  #                                                                             # 
 3  # Copyright (C) 2007 Gary S Thompson (https://gna.org/users/varioustoxins)    # 
 4  # Copyright (C) 2011-2012 Edward d'Auvergne                                   # 
 5  #                                                                             # 
 6  # This file is part of the program relax (http://www.nmr-relax.com).          # 
 7  #                                                                             # 
 8  # This program is free software: you can redistribute it and/or modify        # 
 9  # it under the terms of the GNU General Public License as published by        # 
10  # the Free Software Foundation, either version 3 of the License, or           # 
11  # (at your option) any later version.                                         # 
12  #                                                                             # 
13  # This program is distributed in the hope that it will be useful,             # 
14  # but WITHOUT ANY WARRANTY; without even the implied warranty of              # 
15  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               # 
16  # GNU General Public License for more details.                                # 
17  #                                                                             # 
18  # You should have received a copy of the GNU General Public License           # 
19  # along with this program.  If not, see <http://www.gnu.org/licenses/>.       # 
20  #                                                                             # 
21  ############################################################################### 
22   
23  # Module docstring. 
24  """The module containing the Memo classes.""" 
25   
26   
27 -class Memo(object):
28 """The multi-processor base class Memo of objects and data. 29 30 This object is used by the slave processor (via a Slave_command) to transfer the calculation results back to the master processor. This is to be subclassed by the user. 31 """ 32
33 - def memo_id(self):
34 """Get the unique ID for the memo. 35 36 Currently this is the objects unique python ID (note these ids can be recycled once the memo 37 has been garbage collected it cannot be used as a unique longterm hash). 38 39 @return: A unique ID for this memo. 40 @rtype: int 41 """ 42 43 return id(self)
44