Re: General Languages: Threading, it's uses, and it's dangers.

2020-07-09 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
Re: General Languages: Threading, it's uses, and it's dangers. here's a brief motivating example of why you shouldn't.  What happens if we run f in 5 threads?:import random import time counter = 0 def f(): global counter for i in range(1000): old = counter

Re: General Languages: Threading, it's uses, and it's dangers.

2020-07-09 Thread AudioGames . net Forum — Developers room : redfox via Audiogames-reflector
Re: General Languages: Threading, it's uses, and it's dangers. Thank you. As I said, I wasn't very experienced in things of that nature, and I also don't know too much about computer performance and hardware in general. I'll look into Cython and other such things as per your responses

Re: General Languages: Threading, it's uses, and it's dangers.

2020-07-09 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
Re: General Languages: Threading, it's uses, and it's dangers. Also, one followup to that. If this is going to run on people's laptops (i.e. isn't a server), you can only count on one core for the simulation, which means even in languages better at this than Python, you don't really get

Re: General Languages: Threading, it's uses, and it's dangers.

2020-07-09 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
Re: General Languages: Threading, it's uses, and it's dangers. In Python, threading will not help you if it's a compute-intensive task because of the global interpreter lock, which prevents parallelization.  Better to reach for Cython before threading, at which point you probably don't

General Languages: Threading, it's uses, and it's dangers.

2020-07-09 Thread AudioGames . net Forum — Developers room : redfox via Audiogames-reflector
General Languages: Threading, it's uses, and it's dangers. I'm in a bit of a situation where I feel like, with out testing, that I may need threading to reduce strain on the processing, or at least, illiminate some issues that may arise with the amount of objects being handled at once.I've