×

Python Tutorial

Python Basics

Python I/O

Python Operators

Python Conditions & Controls

Python Functions

Python Strings

Python Modules

Python Lists

Python OOPs

Python Arrays

Python Dictionary

Python Sets

Python Tuples

Python Exception Handling

Python NumPy

Python Pandas

Python File Handling

Python WebSocket

Python GUI Programming

Python Image Processing

Python Miscellaneous

Python Practice

Python Programs

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

Advertisement
Advertisement


Comments and Discussions!

Load comments ↻


Advertisement
Advertisement
Advertisement

Copyright © 2025 www.includehelp.com. All rights reserved.