Due to https://www.python.org/dev/peps/pep-0554/ multi-interpreters
implementation going really slow, I had the audicity to try an alternative route
towards the same objective of implementing multicore support of python:
instead of sharing the memory by running multiple threads, I employed
an interprocess shared memory with multiple processes.

I know there are multiprocessing.sharedctypes and multiprocessing.shared_memory,
but I went much deeper into it by solving two problems they failed to solve:
sharing of complex dynamic objects and synchronization of data access.

I have a working prototype to show: 
https://github.com/byko3y/python-shared-objects
It's a kind of software transactional memory within shared memory. It has a 
basic support
for fundamental python types (bool, int, str, bytes, tuple, list, dict, object),
for both atomic and non-atomic transactions via fine-grained RW-locks, has a 
built-in
protection against deadlock and starvation.

Most of my code can also be used for cross-interpreter communication after PEP 
554
is successfully implemented, since cross-interpreter communication is still an 
open question.
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/JNRA3UXNV3WEYBI43XK3A6CNJSVKJQ6V/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to