Problem With Python Threads | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Problem With Python Threads

Hey, Im currently making a Game with Python Sockets that also require threads (import threading). at some point of the game; the user can (doesn't have to) enter something as input, BUT when receiving data - it'll output to his screen. (like a chatting server, receive while having an opportunity to enter input). user1 screen: user1> user2> hi user1> user2> how are you? user1> im fine, thanks user1> user2> ok, bye etc.... user2 screen: user2> hi user2> how are you? user2> ok, bye The problem is with user2 as you can see, and i have a bigger problem with that in my game because of that.. (i wont elaborate).. Help plz?

4th Apr 2021, 1:41 PM
Yahel - avatar
2 Answers
Odd. Is it duplicate code running for both user1 and user2?
5th Apr 2021, 11:58 PM
Brian - avatar
Brian user 1 and user2 are running the exact same code.
6th Apr 2021, 4:22 AM
Yahel - avatar