Questions tagged [aio-write]
7 questions
23
votes
5 answers
Asynchronous file writing possible in python?
Is there an easy way write to a file asynchronously in Python?
I know the file io that comes with Python is blocking; which is fine in most cases. For this particular case, I need writes not to block the application at all, or at least as minimally…

RaySl
- 497
- 2
- 7
- 14
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
3
votes
2 answers
how to wait on async files in perl
I am trying to test a logging module which asynchronously writes to a file... the unit test tries to read the log to make sure the written message matches expected. However, I am finding that the asynchronous writes by the module don't reach the…

tbischel
- 6,337
- 11
- 51
- 73
1
vote
1 answer
C file filled with garbage
I need to fill my file with same numbers for example 00000.... I want to use asynchronous aio_write function. But here what I get
^@ w▒(▒▒▒▒▒l▒@^@Y▒^@^@^@^@▒▒▒▒u▒l▒@*`▒^@ w▒h▒▒▒ ......
Here's my code
int main(int argc, char *argv[] ){
int sk;
…

David
- 33
- 4
1
vote
1 answer
Linux system call aio_write() fails with error code 22 (EINVAL)
I have a testing utility that uses linux aio_write and aio_read.
This testing utility wraps my static library and test it. This library is multi-threaded black box.
Up until now, it worked fine. But now we made a big change into the this black-box…

yanger
- 227
- 1
- 3
- 14
0
votes
2 answers
why does aio_write() act wrong?
I want to write 2 files by using aio_write.
Used 32KB buffer and repeat aio_write 2048 times for 1 file.(file size is 64MB)
However result is not 64MB but size is 64MB + 32KB, now.
Also sometimes file is written by garbage.
I want to fill 'A' to…

Kwang Hun Lee
- 23
- 2
- 6
0
votes
1 answer
Filing file with zeroes
My file should be filled with 0. I want to do that using aio_write As a result my file should look like 000000000.... but as a result I get that my file is filled with garbage…

David
- 3,055
- 4
- 30
- 73