Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(16)  |  Call(2)  |  Derive(9)  |  Import(5)

src/k/a/kamaelia-HEAD/Code/Python/Axon/Axon/Scheduler.py   kamaelia(Download)
from Axon.idGen import strId, numId
from Axon.debug import debug
from Axon.Microprocess import microprocess
from Axon.Base import AxonObject as _AxonObject
from Axon.Ipc import *
class scheduler(microprocess):
   """Scheduler - runs microthreads of control."""
   run = None
   wait_for_one = False
   def __init__(self, **argd):
                           if tag == "":
                              tag = "__" + mprocess.name[-10:] # So we have a clue of parentage(!)
                           newThread = microprocess(result.args[0], reactivate(mprocess), tag = tag )
                           newThread.activate()
                           del self.threads[mprocess]
   class foo(microprocess):
      def main(self):
         while 1:
            yield 1
   a=foo()

src/k/a/kamaelia-HEAD/Code/Python/Axon/Axon/Component.py   kamaelia(Download)
from Axon.idGen import strId, numId
from Axon.debug import debug
from Axon.Microprocess import microprocess
from Axon.Postoffice import postoffice
from Axon.Scheduler import scheduler
class component(microprocess):
   """\
   Base class for an Axon component. Subclass to make your own.
 
   A simple example::

src/k/a/kamaelia-HEAD/Sketches/MPS/BugReports/FixTests/Axon/Axon/Scheduler.py   kamaelia(Download)
from Axon.idGen import strId, numId
from Axon.debug import debug
from Axon.Microprocess import microprocess
from Axon.Base import AxonObject as _AxonObject
from Axon.Ipc import *
class scheduler(microprocess):
   """Scheduler - runs microthreads of control."""
   run = None
   wait_for_one = False
   def __init__(self, **argd):
                           if tag == "":
                              tag = "__" + mprocess.name[-10:] # So we have a clue of parentage(!)
                           newThread = microprocess(result.args[0], reactivate(mprocess), tag = tag )
                           newThread.activate()
                           del self.threads[mprocess]
   class foo(microprocess):
      def main(self):
         while 1:
            yield 1
   a=foo()

src/k/a/kamaelia-HEAD/Tests/Python/Axon/test_Microprocess.py   kamaelia(Download)
import Axon.Scheduler as Scheduler
from test___str__ import str_Test
from Axon.Microprocess import microprocess as microprocess
from Axon.util import next,vrange
 
      class SpecialSchedulerMicroprocess(microprocess):
         pass
      SpecialSchedulerMicroprocess.setSchedulerClass(self.DummySched)
      specialmp = self.init_test(SpecialSchedulerMicroprocess)
      basicmp.activate()
      class testthread(microprocess):
         def __init__(self):
            self.i = 0
            self.__super.__init__()
         def main(self):
      class testthread(microprocess):
         def __init__(self):
            self.i = 0
            self.__super.__init__()
         def main(self):

src/k/a/kamaelia-HEAD/Sketches/MPS/BugReports/FixTests/Axon/Axon/Component.py   kamaelia(Download)
from Axon.idGen import strId, numId
from Axon.debug import debug
from Axon.Microprocess import microprocess
from Axon.Postoffice import postoffice
from Axon.Scheduler import scheduler
class component(microprocess):
   """\
   Base class for an Axon component. Subclass to make your own.
 
   A simple example::