Skip to main content

Linux AIO API wrapper

Project description


Linux AIO API wrapper

This is about in-kernel, file-descriptor-based asynchronous I/O. It has nothing to do with the asyncio standard module.

python 2 Notes

In python 2.7, a memoryview of a bytearray, despite being writable, is rejected by ctypes:

>>> from ctypes import c_char
>>> a = bytearray(b'foo')
>>> c_char.from_buffer(a)
>>> b = memoryview(a)
>>> b.readonly
>>> c_char.from_buffer(b)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: expected a writeable buffer object

This means that it is not possible to only read or write a few bytes at the beginning of a large buffer without having to copy memory.

The same code works fine with python 3.x .

This is considered as python 2.7 ctypes bug, and not a python-libaio bug.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for libaio, version 0.4
Filename, size File type Python version Upload date Hashes
Filename, size libaio-0.4.tar.gz (8.5 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page