jaromiru / AI-blog

Accompanying repository for Let's make a DQN / A3C series.
https://jaromiru.com
MIT License
392 stars 173 forks source link

Threading in A3C is not really concurrent #4

Open jaromiru opened 7 years ago

jaromiru commented 7 years ago

Used threading library used in A3C example is not really concurrent. See https://docs.python.org/3/library/threading.html.

In CPython, due to the Global Interpreter Lock, only one thread can execute Python code at once.

This implementation still benefits from this design, performance is however severely degraded. Could be possibly fixed by rewriting in multiprocessing library, https://docs.python.org/3.6/library/multiprocessing.html

If anyone wants to do it, let me know.

mkhodabandeh commented 7 years ago

Any update on this? :)

verystrongjoe commented 6 years ago

Thanks! Not only using multiprocessing but also we need to communicate with ipc. Is there any example for this?