Quantcast
Channel: Visual C# forum
Viewing all articles
Browse latest Browse all 31927

Run 2 tasks independently, when 1 of them could exist or not

$
0
0

Ok, this question may be simple. I have the following code:

public async Task Start()
        {
            Remux();
            if (TransmitEnabled && userLogged)
                Transmit();
        }
private async Task Remux()
        {
        }

        private async Task Transmit()
        {
        }


As you see, there is not await keywork, but it should be one, right? I don't want to await Remux() in order to run the condition and Transmit statements, so how can I write this code in order to run the 2 tasks independently?


Take a look at WPF FlashMessage
About.me



Viewing all articles
Browse latest Browse all 31927

Trending Articles