Use await(async) methods inside BatchJob

Tags: #<Tag:0x00007efd1e1b5c20>
BatchJob.StartNew(async(batchJob) => {
     for (var i = 0; i < 10; i++)
    {
        x.Enqueue(() => SendEmail(i));

       await doSomework(i)
    }
}

If i call async method inside batchjob only back ground job will be created.

BatchJob.StartNew((batchJob) => {
     for (var i = 0; i < 10; i++)
    {
        x.Enqueue(() => SendEmail(i));

       doSomework(i).wait()
    }
}

but when i use .wait() method it is working.

I mean only One back ground job will be created