Near 11:25, is there some magic where the Thread base class automagically understand that self.param1 should be used on initialization to define args=()? I guess I expected you to still have to pass param1 into Thread's args somehow. Super helpful video!
Hi Thanks for your comment. In this case I'm not using thread args() to pass the parameter in the thread function but using derived class ___init__ to have param1.. In the run() function, I'm using self.param1 passed in __init__ Hope it clarifies 🙏🙏🙏
Hey bro, how can I store all threads? I have created a sub class of thread. It has some variable which updates every seconds. I want to store all threads and get any of them and print/use that variable
Someone to assist. I am having issue with a socket. This is the output I get: Line 683: in process_request_thread self.finish_request(request, client_address) this is my code below: try: self.finish_request(request, client_address) except Exception: self.handle_error(request, client_address) finally: self.shutdown_request(request) Can anyone tell me what is to be corrected?
Thanks for your comment..Today’s operating systems will take care of this..once the main process exits..orphaned threads should be cleared by OS.. even if they don’t do immediately.. Hope this info helps Thanks 🙏
I wish I had teacher like you during my college time , made complex concept so easy. thank you so much
Near 11:25, is there some magic where the Thread base class automagically understand that self.param1 should be used on initialization to define args=()? I guess I expected you to still have to pass param1 into Thread's args somehow. Super helpful video!
Hi
Thanks for your comment.
In this case I'm not using thread args() to pass the parameter in the thread function but using derived class ___init__ to have param1..
In the run() function, I'm using self.param1 passed in __init__
Hope it clarifies 🙏🙏🙏
A same function in a for loop(within function def.) should be run in multiple thread..is it possible sir??
Hey bro, how can I store all threads? I have created a sub class of thread. It has some variable which updates every seconds. I want to store all threads and get any of them and print/use that variable
why do you need that super()__init__() method inside init ? @10:25
what is the name of editor that you are using?
I am using Jupyter notebooks. Hope it Helps 🙏
Someone to assist. I am having issue with a socket. This is the output I get:
Line 683: in process_request_thread self.finish_request(request, client_address) this is my code below:
try:
self.finish_request(request, client_address)
except Exception:
self.handle_error(request, client_address)
finally:
self.shutdown_request(request)
Can anyone tell me what is to be corrected?
you can create a thread with a function that just while True:, so the main program ends but the thread never ends...good to make viruses.
Thanks for your comment..Today’s operating systems will take care of this..once the main process exits..orphaned threads should be cleared by OS.. even if they don’t do immediately.. Hope this info helps
Thanks 🙏
Still on Windows 98? :D