Skip to main content

AtomicLong

Sometimes you need to increment some numbers … atomically … in python.

AtomicLong was born out of the need for fast thread-safe counters in python.

It uses CFFI to bind GCC’s Atomic Builtins.

Its value is a C long which can be incremented, decremented, and set atomically. It is inspired by Java’s java.util.concurrent.atomic.AtomicLong.

Example:

>>> from atomiclong import AtomicLong
>>> a = AtomicLong(0)
>>> a += 1
>>> a.value
1
>>> a += 10
>>> a.value
11
>>> a.value = 1000
>>> a.value
1000
>>> a -= 100
>>> a.value
900

Metadata

Release files for atomiclong 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for atomiclong 0.1.1
File Size Uploaded Provenance
atomiclong-0.1.1.tar.gz 5.1 kB Without provenance Details

Release files / atomiclong-0.1.1.tar.gz

Download URL atomiclong-0.1.1.tar.gz
Size 5.1 kB
Tags Source
SHA-256 checksum
How to use checksums
cb1378c4cd676d6f243641c50e277504abf45f70f1ea76e446efcdbb69624bbe
BLAKE2b-256 checksum
How to use checksums
868c70aea8215c6ab990f2d91e7ec171787a41b7fbc83df32a067ba5d7f3324f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for atomiclong 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.1.1 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page