~ubuntu-branches/ubuntu/wily/python-eventlet/wily

« back to all changes in this revision

Viewing changes to eventlet/green/threading.py

  • Committer: Package Import Robot
  • Author(s): Dave Walker (Daviey)
  • Date: 2012-05-18 13:36:26 UTC
  • mfrom: (4.1.4 sid)
  • Revision ID: package-import@ubuntu.com-20120518133626-v2hvgj9cza44ub0r
Tags: 0.9.16-2ubuntu1
* Merge from Debian, remaining changes:
  - Drop python-zmq from build depends, it's currently in universe.

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
 
7
7
__patched__ = ['_start_new_thread', '_allocate_lock', '_get_ident', '_sleep',
8
8
               'local', 'stack_size', 'Lock', 'currentThread',
9
 
               'current_thread']
 
9
               'current_thread', '_after_fork', '_shutdown']
10
10
 
11
11
__orig_threading = patcher.original('threading')
12
12
__threadlocal = __orig_threading.local()
33
33
    def __repr__(self):
34
34
        return '<_GreenThread(%s, %r)>' % (self._name, self._g)
35
35
 
 
36
    def join(self, timeout=None):
 
37
        return self._g.wait()
 
38
 
36
39
    @property
37
40
    def name(self):
38
41
        return self._name
39
42
 
 
43
    @name.setter
 
44
    def name(self, name):
 
45
        self._name = str(name)
 
46
 
40
47
    def getName(self):
41
48
        return self.name
42
49
    get_name = getName
43
50
 
44
 
    def join(self):
45
 
        return self._g.wait()
 
51
    def setName(self, name):
 
52
        self.name = name
 
53
    set_name = setName
 
54
 
 
55
    @property
 
56
    def ident(self):
 
57
        return id(self._g)
 
58
 
 
59
    def isAlive(self):
 
60
        return True
 
61
    is_alive = isAlive
 
62
 
 
63
    @property
 
64
    def daemon(self):
 
65
        return True
 
66
 
 
67
    def isDaemon(self):
 
68
        return self.daemon
 
69
    is_daemon = isDaemon
46
70
 
47
71
 
48
72
__threading = None