Skip to content

Commit 65ee8ef

Browse files
authored
Update p01_start_stop_thread.rst
1 parent 71a80a8 commit 65ee8ef

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

source/c12/p01_start_stop_thread.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,9 @@ Python解释器直到所有线程都终止前仍保持运行。对于需要长
111111
112112
class CountdownThread(Thread):
113113
def __init__(self, n):
114-
super().__init__()
115-
self.n = 0
116-
def run(self):
114+
super(CountdownThread, self).__init__()
115+
          self.n = n
116+
      def run(self):
117117
while self.n > 0:
118118
119119
print('T-minus', self.n)

0 commit comments

Comments
 (0)