/[escript]/branches/subworld2/escriptcore/py_src/splitworld.py
ViewVC logotype

Diff of /branches/subworld2/escriptcore/py_src/splitworld.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 5504 by jfenwick, Wed Mar 4 22:58:13 2015 UTC revision 5505 by jfenwick, Wed Mar 4 23:05:47 2015 UTC
# Line 143  class Job(object): Line 143  class Job(object):
143      A return value of False indicates work still to be done      A return value of False indicates work still to be done
144      """      """
145      return True      return True
146    
147    class FunctionJob(Job):
148      """
149      Takes a python function (with no params) to be called as the work method
150      """
151      def __init__(self, fn):
152        super(FunctionJob, self).__init__()
153        self.__fn__ = fn
154        
155      def work(self):
156        self.__fn__()
157        return True

Legend:
Removed from v.5504  
changed lines
  Added in v.5505

  ViewVC Help
Powered by ViewVC 1.1.26