Hi, Amaan. The CPython implementation of Python is single-threaded, so you won't run into that issue. If you want to explicitly introduce multi-threading, you would have to use a scheduler to ensure order/timing. See sched class: docs.python.org/3/library/sched.html
Either way, the GIL makes sure no two threads are active at the same time. That's why multi-threaded is concurrent not parallel.
Happy coding!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi, Amaan. The CPython implementation of Python is single-threaded, so you won't run into that issue. If you want to explicitly introduce multi-threading, you would have to use a scheduler to ensure order/timing. See
sched
class: docs.python.org/3/library/sched.htmlEither way, the GIL makes sure no two threads are active at the same time. That's why multi-threaded is concurrent not parallel.
Happy coding!