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
The google-storage1 APIs use a mix of sync (std::io) and async APIs. For instance, the upload method takes an argument of ReadSeek which uses blocking IO, but the method itself is async. Looking through the implementation, it appears that ultimately the work is done in doit, which uses the synchronous ReadSeek instance without using something like tokio::task::block_in_place. My understanding of tokio is that such mixed sync and async usage is highly discouraged, since it will end up blocking unrelated async tasks while doing the sync IO operations. Am I missing something, or is this a real issue?
The text was updated successfully, but these errors were encountered:
That's a great catch! When the library was converted to async, this trait was overlooked. Fixing it could certainly be done by switching it out with its async counterpart.
The
google-storage1
APIs use a mix of sync (std::io
) and async APIs. For instance, theupload
method takes an argument ofReadSeek
which uses blocking IO, but the method itself isasync
. Looking through the implementation, it appears that ultimately the work is done indoit
, which uses the synchronousReadSeek
instance without using something liketokio::task::block_in_place
. My understanding oftokio
is that such mixed sync and async usage is highly discouraged, since it will end up blocking unrelated async tasks while doing the sync IO operations. Am I missing something, or is this a real issue?The text was updated successfully, but these errors were encountered: