Replies: 1 comment
-
I wonder what query you used. There are 13k hits when I search for it. But to your real question, yes JoinableTaskFactory works great in WPF apps. Visual Studio itself is largely a WPF app. I don't know how to write a query for github to find the intersection of WPF and JoinableTaskFactory uses, but my approximation at it shows mostly Visual Studio extensions, so that's not particularly helpful to you. I whipped up a new WPF app and this is how I would start: public partial class App : Application
{
public JoinableTaskContext JoinableTaskContext = null!; // set in App_Startup
public static new App Current => (App)Application.Current;
public App()
{
this.Startup += App_Startup;
}
private void App_Startup(object sender, StartupEventArgs e)
{
Debug.Assert(SynchronizationContext.Current is not null);
this.JoinableTaskContext = new();
}
} You can then access it anywhere in your project using |
Beta Was this translation helpful? Give feedback.
-
Good morning
I've just searched the o'reilly portal for all the new WPF / Async programming books for
JoinableTaskFactory
and unfortunately, not a single one uses the JoinableTaskFactory. They all work withasync
, which is apparently an obsolete variant.That's why vs-threading makes a very strange impression: it exists for years, but it seems that hardly any project is using it. If one searches for
JoinableTaskFactory
in the whole GitHub, one does not find a single example 😞Therefore the question:
does anyone know any open-source WPF application that works with
JoinableTaskFactory
?This would help a lot to get the basic pattern right for a WPF application. 😀
Thanks a lot, kind regards,
Thomas
Beta Was this translation helpful? Give feedback.
All reactions