Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnsupportedWidthException on long byte array #6

Open
starkgate opened this issue Apr 13, 2023 · 0 comments
Open

UnsupportedWidthException on long byte array #6

starkgate opened this issue Apr 13, 2023 · 0 comments

Comments

@starkgate
Copy link

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant