2

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 three possible solutions each with some caveats. In this MS article Stephen Cleary talks about yet a few more methods to call asynchronous methods synchronously but I've never seen JoinableTaskFactory analysed or referred in any article.

So my question is, does JoinableTaskFactory still have some of the caveats that the other presented solutions have (or other caveats for that matter) and what are those? Under what circumstances would one use JoinableTaskFactory and under which circumstances would one not use it? What does one need to basically know or take into consideration when using JoinableTaskFactory?

Theodor Zoulias
  • 34,835
  • 7
  • 69
  • 104
cogumel0
  • 2,430
  • 5
  • 29
  • 45
  • 2
    Could you please rewrite the question so that none of the links are necessary to be in a position to post an answer? Links should only be used to support content already in your question. – Enigmativity Oct 25 '21 at 10:03
  • 1
    Everything can be done wrong when are you mixing sync and async workloads, `JoinableTaskFactory` is no panacea and you can still mess things up. As for your situation, well there is nothing to answer it with, there are no details on your situation or what you are trying to do. – TheGeneral Oct 25 '21 at 10:04
  • 1
    @Enigmativity the question is there: what does one need to take into consideration when using `JoinableTaskFactory`. The reason I provided supporting links is so that this doesn't get flagged as a duplicate and to show that I've done my research! ...Although the fact that it's getting downvoted without even so much as a comment as to why leads me to think that might happen anyway.... If you can I can literally copy paste what is on the whole MS blog + other answer though... just not sure how that will help anyone. – cogumel0 Oct 25 '21 at 10:07
  • @TheGeneral apologies but I disagree with no details. In the same way that Stephen Cleary has provided clear examples as to *why* each of the methods he presented may in some situations be good and in others bad, I'm looking for the same with regards to `JoinableTaskFactory`. If I gave you specific details about my problem then I'd be provided with a "do this" solution without actually understanding the *why* I'm doing it or what the caveats of `JoinableTaskFactory` are. – cogumel0 Oct 25 '21 at 10:10
  • 1
    @TheGeneral you say it can be done wrong and can still mess things up: good! That's exactly what I want to _learn_ about! Put that in an answer please so that me and others can understand it and learn from it! – cogumel0 Oct 25 '21 at 10:11
  • @cogumel0 - I don't see any detail about what is `JoinableTaskFactory` in your question. It's unanswerable. – Enigmativity Oct 25 '21 at 10:53

0 Answers0