Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 685e697

Browse files
committed
Provide dummy (do-nothing) settrace() and setprofile() functions until
Jeremy can check in the real things.
1 parent 2740944 commit 685e697

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

Lib/threading.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414

1515
# Rename some stuff so "from threading import *" is safe
1616
__all__ = ['activeCount', 'Condition', 'currentThread', 'enumerate', 'Event',
17-
'Lock', 'RLock', 'Semaphore', 'BoundedSemaphore', 'Thread', 'Timer']
17+
'Lock', 'RLock', 'Semaphore', 'BoundedSemaphore', 'Thread',
18+
'Timer', 'setprofile', 'settrace']
1819

1920
_start_new_thread = thread.start_new_thread
2021
_allocate_lock = thread.allocate_lock
@@ -600,6 +601,13 @@ def enumerate():
600601
_active_limbo_lock.release()
601602
return active
602603

604+
# XXX This needs a real defintion.
605+
def settrace(tracefunc):
606+
pass
607+
608+
# XXX This needs a real defintion.
609+
def setprofile(dispatchfunc):
610+
pass
603611

604612
# Create the main thread object
605613

Misc/NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,10 @@ Library
127127
that cooperate with the functions of the same name in the sys
128128
module. A function registered with the threading module will
129129
be used for all threads it creates.
130+
XXX Somebody forget to check these in to threading.py, although
131+
XXX some other library modules call them. This will be repaired
132+
XXX before the final release. For now, dummy settrace() and
133+
XXX setprofile() functions have been added to threading.py.
130134

131135
- copy.py: applied SF patch 707900, fixing bug 702858, by Steven
132136
Taschuk. Copying a new-style class that had a reference to itself

0 commit comments

Comments
 (0)