Hello everbody, can someone explain me why pypy needs the gil? In CPython the main reason is the reference counting but pypy doesnt use reference counting. Thanks in advance. Regards Sebastian
Please check PyPy-STM http://doc.pypy.org/en/latest/stm.html On Sun, Feb 26, 2017 at 3:43 PM Sebastian K via pypy-dev < pypy-dev@python.org> wrote:
Hello everbody,
can someone explain me why pypy needs the gil? In CPython the main reason is the reference counting but pypy doesnt use reference counting. Thanks in advance.
Regards
Sebastian _______________________________________________ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev
On Sun, 26 Feb 2017, Sebastian K via pypy-dev wrote:
can someone explain me why pypy needs the gil? In CPython the main reason is the reference counting but pypy doesnt use reference counting.
The main reason is not the reference counting itself, but rather that the garbage collector (which happens to use reference counting) is not thread-safe. It is true that PyPy's garbage collectors do not use reference counting, but in itself, this doesn't make them any thread-safer. On top of that, there are more subtle issues to take care of, so instead of working towards removing the GIL, the decision was made to investigate a completely different approach to parallelization (STM): http://doc.pypy.org/en/latest/faq.html#does-pypy-have-a-gil-why -- Sincerely yours, Yury V. Zaytsev
Currenly focus is on PyPy3.5 right? will there be continuation of development after PyPy3.5? On Sun, Feb 26, 2017 at 4:59 PM Yury V. Zaytsev <yury@shurup.com> wrote:
On Sun, 26 Feb 2017, Sebastian K via pypy-dev wrote:
can someone explain me why pypy needs the gil? In CPython the main reason is the reference counting but pypy doesnt use reference counting.
The main reason is not the reference counting itself, but rather that the garbage collector (which happens to use reference counting) is not thread-safe. It is true that PyPy's garbage collectors do not use reference counting, but in itself, this doesn't make them any thread-safer. On top of that, there are more subtle issues to take care of, so instead of working towards removing the GIL, the decision was made to investigate a completely different approach to parallelization (STM):
http://doc.pypy.org/en/latest/faq.html#does-pypy-have-a-gil-why
-- Sincerely yours, Yury V. Zaytsev _______________________________________________ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev
Continuation of PyPy-STM dev. On Sun, Feb 26, 2017 at 5:41 PM Phyo Arkar <phyo.arkarlwin@gmail.com> wrote:
Currenly focus is on PyPy3.5 right? will there be continuation of development after PyPy3.5?
On Sun, Feb 26, 2017 at 4:59 PM Yury V. Zaytsev <yury@shurup.com> wrote:
On Sun, 26 Feb 2017, Sebastian K via pypy-dev wrote:
can someone explain me why pypy needs the gil? In CPython the main reason is the reference counting but pypy doesnt use reference counting.
The main reason is not the reference counting itself, but rather that the garbage collector (which happens to use reference counting) is not thread-safe. It is true that PyPy's garbage collectors do not use reference counting, but in itself, this doesn't make them any thread-safer. On top of that, there are more subtle issues to take care of, so instead of working towards removing the GIL, the decision was made to investigate a completely different approach to parallelization (STM):
http://doc.pypy.org/en/latest/faq.html#does-pypy-have-a-gil-why
-- Sincerely yours, Yury V. Zaytsev _______________________________________________ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev
Hi, On 26 February 2017 at 11:12, Yury V. Zaytsev <yury@shurup.com> wrote:
The main reason is not the reference counting itself, but rather that the garbage collector (which happens to use reference counting) is not thread-safe. It is true that PyPy's garbage collectors do not use reference counting, but in itself, this doesn't make them any thread-safer. On top of that, there are more subtle issues to take care of (...)
To complete that answer, I updated the faq: http://doc.pypy.org/en/latest/faq.html#does-pypy-have-a-gil-why A bientôt, Armin.
participants (4)
-
Armin Rigo
-
Phyo Arkar
-
Sebastian K
-
Yury V. Zaytsev