DataDog / glommio

Glommio is a thread-per-core crate that makes writing highly parallel asynchronous applications in a thread-per-core architecture easier for rustaceans.
Other
3.12k stars 164 forks source link

Ordering of `ReadManyResult ` #632

Closed ozgrakkurt closed 10 months ago

ozgrakkurt commented 10 months ago

Hello!! Thank you for creating this library

Does the result of ImmutableFile::read_many has the same ordering as the iovs argument? I couldn't find it in docs. From looking at the code it seems like it is ordered but couldn't be sure about it.

Also happy to add this to docs.

glommer commented 10 months ago

I/Os are guaranteed to be initiated in order, but there is no guarantee that they will complete in order. I believe the current implementation does complete them in order, though, but it is usually easier to achieve better performance if ordering guarantees can be broken, so I'd prefer not to provide this guarantee.

ozgrakkurt commented 10 months ago

I/Os are guaranteed to be initiated in order, but there is no guarantee that they will complete in order. I believe the current implementation does complete them in order, though, but it is usually easier to achieve better performance if ordering guarantees can be broken, so I'd prefer not to provide this guarantee.

thanks! Makes a lot of sense about the ordering, also applies to all of my usecases