home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2010 November / maximum-cd-2010-11.iso / DiscContents / calibre-0.7.13.msi / file_1877 (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2010-08-06  |  2.1 KB  |  42 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.6)
  3.  
  4. __docformat__ = 'restructuredtext en'
  5. from types import FunctionType
  6. from zope.interface import Interface, implements
  7.  
  8. class IMultiEngineParallelDecorator(Interface):
  9.     
  10.     def parallel(dist = 'b', targets = None, block = None):
  11.         pass
  12.  
  13.  
  14.  
  15. class ITaskParallelDecorator(Interface):
  16.     
  17.     def parallel(clear_before = False, clear_after = False, retries = 0, recovery_task = None, depend = None, block = True):
  18.         pass
  19.  
  20.  
  21.  
  22. class IParallelFunction(Interface):
  23.     pass
  24.  
  25.  
  26. class ParallelFunction(object):
  27.     implements(IParallelFunction)
  28.     
  29.     def __init__(self, mapper):
  30.         self.mapper = mapper
  31.  
  32.     
  33.     def __call__(self, func):
  34.         self.func = func
  35.         
  36.         def call_function(*sequences):
  37.             return self.mapper.map(self.func, *sequences)
  38.  
  39.         return call_function
  40.  
  41.  
  42.