Question: As it said in the [PHP manual](https://www.php.net/manual/en/function.array-unshift.php) about `array_unshift()` function:

> 
> 7.3.0 This function can now be called with only one parameter. Formerly, at least two parameters have been required.
> 
> 
> 

I didn't get it. How to use such function with only one parameter?

I tried to guess, but nothing happens:

```
$arr = ['one' => 'test', 'two' => 'some'];
array_unshift($arr);
print_r($arr);

// Result:
// Array
// (
//    [one] => test
//    [two] => some
// )

$arr1 = ['what', 'ever'];
array_unshift($arr1);
print_r($arr1);

// Array
// (
//    [0] => what
//    [1] => ever
// )

```

The arrays haven't changed.

Does anyone know what exactly PHP contributors suggest?

Answer: 
It's important to understand how `async` methods work.

First, they start running synchronously, on the same thread, just like every other method. Without that `await Task.Delay(1)` line, the compiler will have warned you that the method would be completely synchronous. The `async` keyword doesn't, by itself, make your method asynchronous. It just enables the use of `await`.

The magic happens at the first `await` that acts on an incomplete `Task`. At that point the method *returns*. It returns a `Task` that you can use to check when the rest of the method has completed.

So when you have `await Task.Delay(1)` there, the method returns at that line, allowing your `MainAsync` method to move to the next line and start the next call to `Calc`.

How the continuation of `Calc` runs (everything after `await Task.Delay(1)`) depends on if there is a "synchronization context". In ASP.NET (not Core) or a UI application, for example, the synchronization context controls how the continuations run and they would run one after the other. In a UI app, it would be on the same thread it started from. In ASP.NET, it may be a different thread, but still one after the other. So in either case, you would not see any parallelism.

However, because this is a console app, which does not have a synchronization context, the continuations happen on any ThreadPool thread as soon as the `Task` from `Task.Delay(1)` completes. That means each continuation can happen in parallel.

Also worth noting: starting with C# 7.1 you can make your `Main` method `async`, eliminating the need for your `MainAsync` method:

```
static async Task Main(string[] args)

```
An async function returns the incomplete task to the caller at its first incomplete `await`. After that the `await` on the calling side will await that task to become complete.

Without the `await Task.Delay(1)`, `Calc()` does not have any awaits of its own, so will only return to the caller when it runs to the end. At this point the returned `Task` is already complete, so the `await` on the calling site immediately uses the result without actually invoking the async machinery.