The Microsoft.VisualStudio.Threading namespace contains APIs for use in Visual Studio SDK projects. These APIs can be used for asynchronous programming in Visual Studio.
Questions tagged [microsoft.visualstudio.threading]
3 questions
12
votes
2 answers
What is the proper usage of JoinableTaskFactory.RunAsync?
I searched online but there is very little information regarding ThreadHelper.JoinableTaskFactory.RunAsync
If I have the following code, Test1 runs on MainThread:
public bool Test1()
{
// Do something here
…

Yituo
- 1,458
- 4
- 17
- 26
2
votes
0 answers
Async to Sync and JoinableTaskFactory
There are already very good questions and references about calling asynchronous methods synchronously, but I wonder how the usage of JoinableTaskFactory might affect the current answers.
In other words, in this question Stephen Cleary discusses…

cogumel0
- 2,430
- 5
- 29
- 45
1
vote
1 answer
How to solve "Avoid foreign task" warning using JoinableTaskFactory
I ran into a situation like this:
private async Task SomeMethod(Task dataTask)
{
var data = await dataTask;
// process data...
}
We have the VS-threading analyzer and this emit a warning: VSTHRD003…

LeCholet
- 33
- 7