~ubuntu-branches/ubuntu/wily/python-pykka/wily-proposed

« back to all changes in this revision

Viewing changes to examples/counter.py

  • Committer: Package Import Robot
  • Author(s): Stein Magnus Jodal
  • Date: 2015-07-29 21:46:22 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20150729214622-6lfx5mo8sakumpww
Tags: 1.2.1-1
* New upstream release.
* Bump Standards-Version to 3.9.6.
* Add Build-Depends on python[3]-setuptools.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
 
5
5
 
6
6
class Adder(pykka.ThreadingActor):
 
7
 
7
8
    def add_one(self, i):
8
9
        print('{} is increasing {}'.format(self, i))
9
10
        return i + 1
10
11
 
11
12
 
12
13
class Bookkeeper(pykka.ThreadingActor):
 
14
 
13
15
    def __init__(self, adder):
14
16
        super(Bookkeeper, self).__init__()
15
17
        self.adder = adder