Python atomic for shared data types

The article regarding this product, titled "Python shared atomic data types" has recently been published by Software: Practice and Experience, doi: 10.1002/spe.3259. The abstract of the paper is following:

Although atomicity plays a key role in data operations of shared variables in parallel computation, researchers haven't treated atomicity in Python in much detail. This study provides a novel approach to integrate the CPU-based atomic C APIs into Python shared variables by C Foreign Function Interface for Python (CFFI) on all major platforms and utilises Cython to optimise calculation in CPython. Evidence shows that the resulting product, Shared Atomic Enterprise (SAE), could accelerate data operations on shared data types to a large extent. These findings provide a solid evidence base for the massive utilisation of Python atomic operations in parallel computation and concurrent programming.

The module can be used for atomic operations under multiple processs, multiple threads and multiple coroutines conditions.

Included datatypes:

Buy Enterprise Version!!!

V3 is out! Performance optimized! Partially imcompatible with V2.
For new requirements and bugs, please go to Jira.

For installation guide, please refer to Shared Atomic Enterprise.
To activate the enterprise version, please refer to Atomic tools.
For new requirements and bugs, please go to Jira.

You could also subscribe or unsubscribe our mailing list to get posted.

Shared Atomic Enterprise Requirement:

  • Supported Python,

    • CPython 3.6 - 3.12, if compiled by the user, for CPython3.6 --enable-shared should be added in the configuration parameter.

    • PyPy 3.8 - 3.10 (numpy should be installed to use the atomic_shared_memory)

  • Supported platforms,

    • MacOSX x86_64 Big Sur and above, centos7,9/rhel7,9 x86_64, Ubuntu Linux 18/20/22 x86_64 and Suse Linux Enterprise Server 12/15 x86_64, Microsoft Windows 10 x64, Windows Server 2019 x64

    • The package requires libatomic(1) and libgomp installed on Linux platform. If Python3.6 installed on RHEL/Centos9, this package needs zlib to run.

    • bitarray if you need to use atomic_set or atomic_list.

    • Microsoft Visual C++ 2019 Redistributable(X64) on Windows.

    • windows-curses>=2.3.1 on windows.

For example usage of the module, please visit this atomic_api_example