Changelogs » Atomic

PyUp Safety actively tracks 266,461 Python packages for vulnerabilities and notifies you when to upgrade.

Atomic

0.7.0

**Warning:** This new version is not backward compatible with previous ones.
  
  The C extension is no more, replaced by a less clunky _cffi_ implementation.
  The new C code use the fairly recent atomic built-in functions introduced in  `gcc >= 4.7`.
  
  The new API allows a more expressive way to increments or decrement values:
  
  python
  from atomic import AtomicLong
  
  atomic = AtomicLong(0)
  atomic += 1
  atomic.value
  
  
  A new `AtomicLongArray` is also introduced that allows you to have an array of `AtomicLong`, only direct assignation is atomic for now. The implementation will hopefully allows more useful use cases in the future.
  
  python
  from atomic import AtomicLongArray
  
  atomic = AtomicLongArray([0, 2])
  atomic.value
  
  
  Due to the new underlying mechanism, values have to be integer otherwise a `TypeError` is raised.

Links

Releases