[ad_1]
Facebook –
GitHub –
Google+ –
LinkedIn –
reddit –
Support –
thenewboston –
Twitter –

Python Programming Tutorial – 34 – threading
by
Tags:
Comments
46 responses to “Python Programming Tutorial – 34 – threading”
-
this tutorial is awesome, you teach it from the basic and you made threading subject very clear!
-
So will it give different output every time the program is ran?
-
don't name your python file for this tutorial 'threading.py'. it will interfere with the threading library which has the same name. also, change the value of 10 in the code to something bigger like 1000 to see the context switches. the linux kernel probably handles it differently then the windows kernel so that might be why you need a higher number there.
-
For those of you getting an error involving getName(), use self.getName() instead of threading.currentThread().getName().
-
Can someone pls tell me why is there .getname() in print
-
will this work on the raspberry pi, opencv, webcam to increase fps? thanks.
-
Thanks Bucky, I have been wondering why my computer did not mix the outputs, I had to go to 36 to make it work
-
Any suggestions on passing arguments into my run function? Whenever I call start it doesn't seem to pass arguments to run?
-
why output always change in each time that I run this program?
-
Don't forget to return at the end of the run function or the thread will not close and code after the thread might not execute! Great video as always.
-
If output prints send 10 times and then received 10 times. Make sure you are using single quotes when passing name argument in BuckysMessenger class constructor. example x = BuckysMessenger(name='send out messages')
-
If the loop is 10 times i see 10 times "send" and after that 10 times "receive", but if the loop is 100 I see first 3 times "send", after that – receive, send, receive, etc. , why is like that ?
-
Bucky, is there a safe way to kill the threads? or does python automatically do it at the end of the program? its probably best to close the threads within the program just to be sure all memory is released properly.
-
I don't know why but in my pycharm this programme don't give me an output though there is no error durring debugging and running
-
Hej Bucky,
i was desperately waiting for a practical example on python's multi threading. In the next videos you build a Word Frequency Counter. Wouldn't it be a suitable case to use multi-treading if you split the text first? This way you could explain how to load the threads with the data and merge it afterwards. I'd be thankful to see something like this, you do great tutorials! 🙂 -
But wouldn't you want to do it in a scenario of only adding which is just cummutative property of addition?
-
Thanks Bucky, I have been wondering why my computer did not mix the outputs, I had to go to 10000 to make it work
-
Thanks Bucky
-
Very nice tutorials, cheers:)
-
Thanks Bucky,,,,, Cool Videos 😀
-
I typed your code exactly the same.. I think.. but the getName()'s don't print out in a jumbled order.. it's 10 "Send out messages" then 10 "Receive messages"
What could be the cause of this?
-
Good one.
-
Good videos. Really learned quite a bit of information in an easy to understand way and in a very fast time. I always put your videos at 2x speed, and it's great information in no time at all.
-
Doesn't the Python Global Interpreter Lock prevent multithreading?
-
how is that different from multiprocessing?
-
neat
-
why do we use this statement?? – print(threading.currentThread().getName())
-
Traceback (most recent call last):
File "D:/PythonLernen/threading.py", line 1, in <module>
import threading
File "D:PythonLernenthreading.py", line 3, in <module>
class MyMessenger(threading.Thread):
AttributeError: 'module' object has no attribute 'Thread' -
My computer still did them in order, lol. It's probably too slow to do both threads at once.
-
Bucky — I'm becoming your #1 fan. There are a ton of tutorials on YT but when I watch yours you really SPELL IT OUT for people and that's the key. I've spent all day trying to figure out how I can have a seconds counter running while other code is executing and this may be it. You're something else. ++
-
Is this how you make multi-core(processor) software?
-
Very nice tutorial Bucky..cheers.
-
for some reason it doesn't work for me.. it prints the one i start first 10 times then the second, why is that?
-
In specific when would we be using threading for a company just curious ?
-
Excellent lesson. Nice introduction to parallel programming. Thanks!
-
Is it possible to make a chat program with this Program/Code (Pycharm)?
-
Hey Bucky. Can you please do a Scala tutorial? I know the really basic stuff since I know Java, but I'd like to learn more. Thanks.
-
Can you do blender tutorials?
-
What can u make with Phython code?
-
For the past 3 months or I've been sidetracked by many different things, so I was surprised today when I saw that Bucky had posted new videos! Not only had he posted some videos, but he had posted loads of them, so he has now put me in the difficult situation of having to watch all of them. Also I had been raring to learn Python for the past few months, so this is just perfect.
Welcome back, Bucky. It'd be cool if you responded to this comment. 😛
BEST TEACHER EVER!
-
Do swift tutorials PLEAS
-
I could see this becoming a simple chat tutorial.
-
Awesome, always wanted to practice this. And with my fav lang!
-
Dude keep teaching i love the way u do, so easy bruh. Go more in depth with python ill stay tuned. Thank you very much 4 ur time.
-
Second
-
wow why so many at once?! thanks tho 😀
Leave a Reply