I'm really not sure why, but in some / most cases, awaiting a SpotiFire-object causes a deadlock. The await never completes. We should check whether this is because the library never sets is_loaded to true, or because of threading issues.
At the moment I'm working around this problem by doing a manual wait. It's dead ugly though, especially since this is exactly what the await was introduced for.
while (!resource.IsLoaded) {
await Task.Delay(50);
}
I'm using WPF btw, so the continuations will be run on the current Dispatcher.
EDIT: await only seems to fail on the PlaylistContainer, not on the resources that are loaded via IAsyncLoaded.
I'm really not sure why, but in some / most cases, awaiting a SpotiFire-object causes a deadlock. The await never completes. We should check whether this is because the library never sets
is_loaded
to true, or because of threading issues.At the moment I'm working around this problem by doing a manual wait. It's dead ugly though, especially since this is exactly what the
await
was introduced for.I'm using WPF btw, so the continuations will be run on the current
Dispatcher
.EDIT:
await
only seems to fail on thePlaylistContainer
, not on the resources that are loaded viaIAsyncLoaded
.