You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please correct me if I am wrong since I am basically transitioning over from windows to linux and am slowly building my mental model around Linux.
This application seems to in a loop submit an IO request and then try and reap the completion on that same thread, this seems counter-intuitive to how i think async IO is meant to be used. Ideally you would have a thread\ bunch of threads perform I/O's or submit I/O's (in Linux AIO jargon) and then have a separate pool of threads reaping the I/O completions. The way this sample application is written it simply performs the I/O in a very synchronous manner even though it is using Linux AIO under the covers.
I am interested in your thoughts around this.
The text was updated successfully, but these errors were encountered:
I believe Linux AIO is threadsafe: you can submit requests from several threads on the same io_context_t. However, you can also use just one thread, and the I/O will be done in parallel. Both are valid patterns.
Please correct me if I am wrong since I am basically transitioning over from windows to linux and am slowly building my mental model around Linux.
This application seems to in a loop submit an IO request and then try and reap the completion on that same thread, this seems counter-intuitive to how i think async IO is meant to be used. Ideally you would have a thread\ bunch of threads perform I/O's or submit I/O's (in Linux AIO jargon) and then have a separate pool of threads reaping the I/O completions. The way this sample application is written it simply performs the I/O in a very synchronous manner even though it is using Linux AIO under the covers.
I am interested in your thoughts around this.
The text was updated successfully, but these errors were encountered: