Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Apr 14, 2024. It is now read-only.

Commit5714129

Browse files
committed
tabs to spaces
1 parent039c1d5 commit5714129

18 files changed

+2627
-2627
lines changed

‎async/__init__.py

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,32 +6,32 @@
66

77
#{ Initialization
88
def_init_atexit():
9-
"""Setup an at-exit job to be sure our workers are shutdown correctly before
10-
the interpreter quits"""
11-
importatexit
12-
importthread
13-
atexit.register(thread.do_terminate_threads)
14-
9+
"""Setup an at-exit job to be sure our workers are shutdown correctly before
10+
the interpreter quits"""
11+
importatexit
12+
importthread
13+
atexit.register(thread.do_terminate_threads)
14+
1515
def_init_signals():
16-
"""Assure we shutdown our threads correctly when being interrupted"""
17-
importsignal
18-
importthread
19-
importsys
20-
21-
prev_handler=signal.getsignal(signal.SIGINT)
22-
defthread_interrupt_handler(signum,frame):
23-
thread.do_terminate_threads()
24-
ifcallable(prev_handler):
25-
prev_handler(signum,frame)
26-
raiseKeyboardInterrupt()
27-
# END call previous handler
28-
# END signal handler
29-
try:
30-
signal.signal(signal.SIGINT,thread_interrupt_handler)
31-
exceptValueError:
32-
# happens if we don't try it from the main thread
33-
print>>sys.stderr,"Failed to setup thread-interrupt handler. This is usually not critical"
34-
# END exception handling
16+
"""Assure we shutdown our threads correctly when being interrupted"""
17+
importsignal
18+
importthread
19+
importsys
20+
21+
prev_handler=signal.getsignal(signal.SIGINT)
22+
defthread_interrupt_handler(signum,frame):
23+
thread.do_terminate_threads()
24+
ifcallable(prev_handler):
25+
prev_handler(signum,frame)
26+
raiseKeyboardInterrupt()
27+
# END call previous handler
28+
# END signal handler
29+
try:
30+
signal.signal(signal.SIGINT,thread_interrupt_handler)
31+
exceptValueError:
32+
# happens if we don't try it from the main thread
33+
print>>sys.stderr,"Failed to setup thread-interrupt handler. This is usually not critical"
34+
# END exception handling
3535

3636

3737
#} END init

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp