Do this:
from threading import Thread
def func1():
print('Working')
def func2():
print("Working")
if __name__ == '__main__':
Thread(target = func1).start()
Thread(target = func2).start()
More Related Contents:
- How to use threading in Python?
- How can I use threading in Python?
- Are lists thread-safe?
- Freezing/Hanging tkinter GUI in waiting for the thread to complete
- multiprocessing.Pool: When to use apply, apply_async or map?
- What are the differences between the threading and multiprocessing modules?
- multiprocessing: Understanding logic behind `chunksize`
- Make 2 functions run at the same time
- How to limit concurrency with Python asyncio?
- PyQt4 Wait in thread for user input from GUI
- Using win32com with multithreading
- Threads and tkinter
- multiprocessing vs multithreading vs asyncio in Python 3
- Multiprocessing causes Python to crash and gives an error may have been in progress in another thread when fork() was called
- Python: Something like `map` that works on threads [closed]
- deciding among subprocess, multiprocessing, and thread in Python?
- multiprocessing vs multithreading vs asyncio
- Trying to fix tkinter GUI freeze-ups (using threads)
- How do I use threading in Python?
- With “args” vs without “args” to pass arguments to a thread in Python
- How can I read inputs as numbers?
- How to get the return value from a thread in Python?
- Invalid character in identifier
- Python 3 Map function is not Calling up function
- Chunking data from a large file for multiprocessing?
- Type hinting / annotation (PEP 484) for numpy.ndarray
- ‘collectstatic’ command fails when WhiteNoise is enabled
- Schrödinger’s variable: the __class__ cell magically appears if you’re checking for its presence?
- Integer File Descriptor “0” in open()
- Why do I get “TypeError: not all arguments converted during string formatting” trying to substitute a placeholder like {0} using %?