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 🙏