Snippets tagged async task tpl

  • Wrapping Tasks.Task to async

    This code wraps System.Threading.Tasks.Task (that has no return value), properly, so that cancellations and exceptions are preserved, and exceptions keep their stack-traces. It is to be used when the Task only denotes a single computation or value, as it only picks the first exception from the list of exceptions.

    2 people like this

    Posted: 3 years ago by haf