> This seems a bit contradictory and confuses things. When I await(), do I need to do it in a
> loop, or just once?
> It might be a good idea to make a couple subtypes: Signal and Future. Coroutines become Future
> that only await once, while Signal is something that can be awaited many times.
I made a mistake in my previous response, and it requires clarification.
Classes that can be awaited multiple times are indeed possible.
These include TimeInterval, Channel, FileSystemEvent, as well
as
I/O triggers.
All of these classes can be Awaitable.
This is done to allow bulk waiting on objects, regardless of how they
work internally.
So this is meant for functions like awaitXX, although such behavior
is also possible for the await() function itself:
```php
$timeInterval = new Async\TimeInterval(1000);
while(true) {
await($timeInterval);
}
```
As for objects of type Future, it’s clear that in future RFCs there
will be a FutureInterface, which will be implemented by coroutines.