Python threading Module Methods

Python threading Module has the following built-in functions.

Method Description
active_count() Returns the number of Thread objects that are active at any instant.
current_thread() Returns the current Thread object, which corresponds to the caller's thread of control.
enumerate() Returns the list of all the Thread class objects which are currently alive.
get_ident() Returns the "thread identifier" of the current thread.
get_native_id() Return the native Thread ID of the current thread which is assigned by the kernel.
main_thread() Return the main Thread object.
setprofile() Sets a profile method for all the threads that are created by the threading module. The func method is passed to sys.profile() for each method.
settrace() Sets a trace function for all the threads that are created by threading module. The func function is passed to sys.settrace() for each method.
stack_size() Return the thread stack size needed while creating new threads.

Reference:: https://docs.python.org/3/library/threading.html






Comments and Discussions

Ad: Are you a blogger? Join our Blogging forum.





Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing
» Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates


© https://www.includehelp.com some rights reserved.