MultiThreading In Python

Python MultiThreaded Programming

4.40 (75 reviews)
Udemy
platform
English
language
Programming Languages
category
3,847
students
2 hours
content
Oct 2023
last update
$39.99
regular price

What you will learn

you will be able to write Multithread programs using the multithreading APIS in python

Description

Welcome to the Course "MultiThreading In Python":Python Multithreaded Programming 

This course is from a software engineer who has managed to crack interviews in around 16 software companies.

Sometimes, life gives us no time to prepare, There are emergency times where in we have to buck up our guts and start  bringing the situations under our control rather then being in the control of the situation.  At the end of the day, All leave this earth empty handed. But given a situation, we should live up or fight up in such a way that the whole action sequence should make us proud and be giving us goosebumps when we think about it right after 10 years.

Some feel threads are too hard and painful for programmers to use. It can be difficult to get a good education in how to program with threads. Most of the times, concurrent programming remains somewhat esoteric. 

If you’re a programmer and you’re not already writing concurrent software, you should start. 100+ cores could be common ten years from now (or possibly even sooner).

As the typical number of CPUs increases, concurrency is changing from a beneficial option to a necessity.  That will increase demand for understanding of concurrent programming, and every programmer needs the knowledge of concurrent programming. 

This course contains A simplistic programming approach which helps you to learn the concepts and usage of different multi threading apis in the Multi Threading module of Python.

The following programming questions are dealt in this course:

1. Write a pgm to create a thread which will print 'hello world' on the screen
2. Write a pgm to create 5 threads which in turn each will print 'hello world' on the screen
3. Write a pgm to create a thread which adds 2 numbers and prints the result
4. Write a pgm to create 5 threads which executed in parallel, each will add 2 numbers and print the result
5. Write a pgm to print the default thread name while the thread is under execution
6. Write a pgm which creates a thread, officially names it and tries to print the official name of the thread
7. Write a pgm where in we use the logging function to print the thread name, the debug level while the thread is executing
8. Write a pgm to create a thread which is not dependent on the main thread (create a daemon thread)
9. Write a pgm to do the following:
     - Create a daemon thread
     - From the main thread function, wait indefinitely for the daemon thread to complete execution
10. Write a pgm to do the following:
     - Create a daemon thread
     - From the main thread function, wait for a stipulated period to the daemon thread to complete execution
11. Write a pgm to check if the thread is still active and is the thread a daemon
12. Write a pgm to create a daemon thread, and using the enumerate and join function, wait for the daemon thread to complete execution
13. Write a pgm to create 3 daemon threads, and using the enumerate and join function, wait for the deamon threads to complete execution
14. Write a pgm to override the run() function of thread
15. Write a pgm to override the constructor and run() functions of thread
16. Write a pgm where in a thread waits for a particular event indefinitely. once the event is set by the main thread, the thread stops waiting and resumes execution
17. Write a pgm where in a thread waits for a particular event for a particular period of time. once the event is set by the main thread, the thread stops waiting and resumes execution
18. Write a pgm which creates 2 threads which does the following with out conflict:
    Acquire the lock, increment the counter value and release the lock.
19. Write a pgm where in the main thread tries to acquire the lock twice in a sequential fashion
20. What is the advantage of using a with statement to acquire a lock in a thread.
21. Write a pgm where two consumer threads wait on the producer thread to notify them about the availability of the resource
22. Explain the usage of semaphores in threads
23. Explain the usage of threading. local()
24. What are the different lock types a Condition object can be associated  with?
25. What is the method that wakes up all threads which are waiting for the condition to set
26. Which method is used to identify a particular thread?   
27. What is the method used to retrieve the list of all active threads?
28. Which kind of lock supports the following statement:
    - If a thread already owns the lock, acquire() will increment the recursion level by one, and return immediately. 
29. The following states/features supported by the ____________ object
      Locked
      Unlocked
30. The following states/features supported by  the _______________ object
      Locked
      Unlocked
      Owning thread
      Recursion level
31. Which thread method is used to wait until it terminates?
32. How to detect the status of a python thread?
33. How to check if a particular thread is a Daemon or a normal thread ?
34. Which one is reentrant lock type?
35. How to terminate a blocking thread?
36. How is the run() method invoked?
37.  _____________ synchronization method is used to secure the resources with limited capacity


       












Content

Introduction

Introduction
Write a pgm to create a thread which will print 'hello world' on the screen
Write a pgm to create 5 threads which in turn each will print 'hello world'
Write a pgm to create a thread which adds 2 numbers and prints the result
Write a pgm to create 5 threads which executed in parallel, each will ..
Write a pgm to print the default thread name while the thread is under execution
Write a pgm which creates a thread, officially names it and tries to ...
Write a pgm where in we use the logging function to print the thread name and ..
Write a pgm to create a thread which is not dependent on the main thread ...
Write a pgm to Create a daemon thread  and From the main thread function
Write a pgm to Create a daemon thread and From the main thread function ...
Write a pgm to check if the thread is still active and is the thread a daemon
Write a pgm to create a daemon thread & using the enumerate and join function do
Write a pgm to create 3 daemon threads & using enumerate and join do
Write a pgm to override the run() function of thread
Write a pgm to override the constructor and run() functions of thread
Write a pgm where in a thread waits for a particular event indefinitely and
Write a pgm where in a thread waits for a particular event for a particular
Write a pgm which creates 2 threads which does the following with out conflict:
Write a pgm where in the main thread tries to acquire the lock twice in a
What is the advantage of using a with statement to acquire a lock in a thread
Write a pgm where two consumer threads wait on the producer thread to notify the
Explain the usage of semaphores in threads
Explain the usage of threading. local()
Exercise and Interview Questions. Pls visit the description for listof questions

Explain the programs below:

Question 1
Question 2
Question 3
Question 4
Question 5
Question 6
Question 7
Question 8
Question 9
Question 10

Screenshots

MultiThreading In Python - Screenshot_01MultiThreading In Python - Screenshot_02MultiThreading In Python - Screenshot_03MultiThreading In Python - Screenshot_04

Reviews

Max
December 30, 2020
* the course is not systematic. * no practical tasks * no focus on fundamentals at all (what is a thtread? what is an event? purpose of semaphores and mutexes? - not explained at all). Not clear, what is the prerequisite for the course if any. * though the course is relatively short (~2 hours), it is very slow in pace. The lecturer spends minutes explaining the same lines of code over and over again in a ~5-10 lines code. * the course is overall very simple and doesn't cover any advanced topics
Dipika
April 5, 2018
There should be some basic explanation about multi threading. Examples are not good enough to understand. There should be some real world examples. Explanations are repetitive here that can be avoided.
Szymon
February 3, 2018
I am very satisfied with this course. For me things related to threading are not new(C/C++ threading) so it is relatively easy to learn about Python threading . Although some of these programs are not very useful in projects.
Vineet
January 31, 2018
While the course does a good job of explaining basic Thread examples. It doesn't focus on Threading/concurrency as a concept in Python. Its pros/cons, performance issues, global interpreter lock etc. Similar examples can easily be found on the internet on how to use Threads in Python. Not worth the money at all.
Glen
December 25, 2017
The course shows some good simple examples that can be applied to something more complex. I would like to see how threading is used with a GUI not only for a long process but also for modifying the GUI from a thread.
Sourav
September 30, 2017
previously i was having a hard time to understand Multi Threading, but this course cleared all my doubts and now i am able to use multi threading on my own programs. Outstanding course.
Aaron
September 2, 2017
Great overview of multi-threading and locks in Python. Would have like to have seen multiprocessing in this as well, and maybe Python 3.
Garrett
August 21, 2017
It would be nice if the videos had a more descriptive name than just "program 1". I have to watch the first 10 seconds of the video before I know what it will show me.
Yann
August 7, 2017
A very interesting course. The progress of the course is fluid and the course is accompanied by simple and well explained demonstrations.
Fedos_tat
June 24, 2017
It is a very well explained course with good exercises. I would recommend to add some error handling examples. Also it is convenient to have zip file with exercises be attached to this course. Thank you Satish!

Charts

Price

MultiThreading In Python - Price chart

Rating

MultiThreading In Python - Ratings chart

Enrollment distribution

MultiThreading In Python - Distribution chart

Related Topics

1228558
udemy ID
5/25/2017
course created date
11/21/2019
course indexed date
Bot
course submited by