Asynchronous Input/Output, in computer science, is a form of input/output processing that permits other processing to continue before the transmission has finished.
Questions tagged [aio]
177 questions
7
votes
0 answers
aioredis Task was destroyed but it is pending
Preconditions:
python 3.8
aioredis==1.3.0
Sometimes errors below appear in production in sentry:
Task was destroyed but it is pending!
task:

Egor Chupikov
- 71
- 3
7
votes
4 answers
C - How to use both aio_read() and aio_write()
I implement game server where I need to both read and write. So I accept incoming connection and start reading from it using aio_read() but when I need to send something, I stop reading using aio_cancel() and then use aio_write(). Within write's…

Slaus
- 2,086
- 4
- 26
- 41
7
votes
1 answer
Resources associated to an aio_context
The semantics of Linux's Asynchronous file IO (AIO) is well described in the man page of io_setup(2), io_submit(2) and io_getevents(2).
However, without diving in the block IO subsystem, the operational side of the implementation is a little less…

Piezoid
- 638
- 7
- 16
7
votes
1 answer
AIO network sockets and zero-copy under Linux
I have been experimenting with async Linux network sockets (aio_read et al in aio.h/librt), and one thing i have been trying to find out is whether these are zero-copy or not. Pretty much all i have read so far discusses file I/O, whereas its…

Remy
- 329
- 1
- 10
6
votes
1 answer
Asynchronous File I/O via POSIX AIO or Windows Overlapped IO in Java
System.IO.File in .NET and .NET Core has a family of Read...Async() methods, all of which return either Task or Task (Task is the .NET's equivalent of Java's Future).
This looks largely equivalent to AsynchronousFileChannel…

Bass
- 4,977
- 2
- 36
- 82
6
votes
2 answers
File ./ib_logfile101: 'aio write' returned OS error 122
I'm trying to install MySQL 5.6.14 on Ubuntu 12.04 Desktop:
$ scripts/mysql_install_db --no-defaults --force \
--explicit_defaults_for_timestamp --datadir=/tmp/data
And I'm getting:
Installing MySQL system tables...
2013-10-09 09:27:26 6463…

yegor256
- 102,010
- 123
- 446
- 597
6
votes
1 answer
what is difference between io_submit and file with O_ASYNC
I am reading this tutorial on asynchronous disk file I/O, however it doesn't make things clear, it actually makes me more confused.
There are two different async. I/O models according to the tutorial:
Asynchronous blocking I/O where you open a file…

Chang
- 3,953
- 2
- 30
- 43
6
votes
4 answers
POSIX AIO Library and Callback Handlers
According to the documentation on aio_read/write, there are basically 2 ways that the AIO library can inform your application that an async file I/O operation has completed. Either 1) you can use a signal, 2) you can use a callback function
I think…
Charles Salvia
5
votes
3 answers
Asynchronous processing in c++
A Server which will run forever and processes requests needs an asynchronous part of code in it which will execute some database queries and update only when there are any new changes to it. The server has to run forever and this function for…

King
- 1,170
- 2
- 16
- 33
5
votes
5 answers
Posix AIO Bad/Broken?
I'm working on a TFTP implementation that is transitioning away from a convoluted multi-threaded implementation to a single-thread/single-process implementation which uses a state machine to track the state of the sessions connected. TFTP is simple…

Bob
- 2,002
- 3
- 16
- 18
5
votes
4 answers
AIO on OS X vs Linux - why it doesn't work on Mac OS X 10.6
My question is really simple. Why the code below does work on Linux, and doesn't on Mac OS X 10.6.2 Snow Leopard.
To compile save the file to aio.cc, and compile with g++ aio.cc -o aio -lrt on Linux, and g++ aio.cc -o aio on Mac OS X. I'm using Mac…

invalidopcode
- 97
- 1
- 7
5
votes
1 answer
Linux async (io_submit) write v/s normal (buffered) write
Since writes are immediate anyway (copy to kernel buffer and return), what's the advantage of using io_submit for writes?
In fact, it (aio/io_submit) seems worse since you have to allocate the write buffers on the heap and can't use stack-based…

Benito Ciaro
- 1,718
- 12
- 25
4
votes
3 answers
Linux async IO with libaio performance issue
I'm trying Linux libaio for optimized IO performance in server application. I believe I've done everything necessary (using O_DIRECT, align buffer with memory page...). I'm expecting the call to io_submit returns immediately, but a simple test…

Ralph Zhang
- 5,015
- 5
- 30
- 40
4
votes
0 answers
Are iocb requests passed to kernel evaluated in order or not?
I read 2 posts related to Linux AIO (native AIO).
https://blog.cloudflare.com/io_submit-the-epoll-alternative-youve-never-heard-about/
It's important to note the iocb requests passed to kernel are evaluated in-order…

Rick
- 7,007
- 2
- 49
- 79
4
votes
2 answers
how to use httpx.AsyncClient as class member, and close asynchronously
I want to use http client as a class member, but del function could not call await client.aclose().
e.g.:
import httpx
class Foo(object):
def __init__(self):
self.client = httpx.AsyncClient()
def __del__(self):
await…

whi
- 2,685
- 6
- 33
- 40