3 ms·
Python has multithreading, they just don't run concurrently. Which may or may not be suitable for your application. E.g. you can't simultaneously utilize multip
by a2800276 4y ago
Python has multithreading, they just don't run concurrently. Which may or may not be suitable for your application. E.g. you can't simultaneously utilize multiple cores, but you can listen to several blocking IO bound tasks.
- DeathArrow 4y agoWell, that seems to be concurrency without parallelism. Smalltalk has concurrency, too, at least according to this: https://books.pharo.org/booklet-ConcurrentProgramming/ https://books.pharo.org/booklet-ConcurrentProgramming/ and this: https://tonyg.github.io/squeak-actors/ https://tonyg.github.io/squeak-actors/
- toyg 4y agoThat's not technically correct: you can use the multiprocessing library (or the concurrent.futures one, for a more ergonomic api) to spawn cpython processes over multiple cores.
- dontlaugh 4y agoIt is technically correct, multiprocessing doesn't spawn threads and that has several important consequences. In practice though, processes are usually good enough.