Skip to content

UnsupportedWidthException on long byte array #6

Description

@starkgate

Hi, I am using your library to atomically store data in a shared memory buffer. This works fine when I store just a few bytes (for example I have a struct with 2 integers and 2 floats). However, I recently wanted to store a struct with 100 characters along with 10 integers. I received the error below. I cannot find much information on the error in the code or the documentation. Am I doing something wrong or is this a limitation of the library? Are there any workarounds I could implement?

File "venv\Lib\site-packages\atomics\_impl\atomic\funcs.py", line 109, in atomicview
    return AtomicBytesViewContext(buffer=buffer)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "venv\Lib\site-packages\atomics\_impl\atomic\bytes.py", line 22, in __init__
    super().__init__(buffer=buffer, is_integral=False, is_signed=False)
  File "venv\Lib\site-packages\atomics\_impl\atomic\base.py", line 79, in __init__
    raise UnsupportedWidthException(width, readonly=ro)
atomics._impl.exceptions.UnsupportedWidthException: No operations are supported on objects with a width of 110.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions