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
ImageMetadataReader.ReadMetadata does not have an asynchronous version,
and it would be a very good idea to be able to include it, I in particular can do it
in a very easy way without the simplistic Task.Run method. I tell you,
is that I am using this library in asynchronous context and I cannot give myself
the luxury of blocking the thread with synchronous call, then I had to practically
invent a synchronous method that could perfectly be part of this great
library.
The text was updated successfully, but these errors were encountered:
oliver021
changed the title
mageMetadataReader.ReadMetadata method does not have an asynchronous version
ImageMetadataReader.ReadMetadata method does not have an asynchronous version
Mar 17, 2021
The first is a problem when the thread has many responsibilities tied to it, such as the UI thread does.
The second is a problem in highly concurrent environments.
Pushing the work to the thread pool (e.g. using Task.Run) solves the first problem, but not the second.
Solving the second problem requires using async IO when reading data, on the assumption that the bulk of the time spent waiting for extraction to complete comes from IO (which is likely often the case). Supporting this is a large undertaking, as it requires the library to wire async/await all the way through its various APIs. async/await also comes with some overhead, which would need to be measured before we commit to changing any APIs.
I'll close this so we don't fork the discussion. Please subscribe to the other issue for updates.
ImageMetadataReader.ReadMetadata does not have an asynchronous version,
and it would be a very good idea to be able to include it, I in particular can do it
in a very easy way without the simplistic
Task.Run
method. I tell you,is that I am using this library in asynchronous context and I cannot give myself
the luxury of blocking the thread with synchronous call, then I had to practically
invent a synchronous method that could perfectly be part of this great
library.
The text was updated successfully, but these errors were encountered: