Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions base.rfc
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,22 @@ namespace Async {
*/
function getCoroutines(): array {}

/**
* Returns the coroutine by id
*/
function getCoroutine( int $id ): ?Coroutine {}

// === Core Classes ===

/**
* Represents a coroutine - an executable unit that can be suspended and resumed
*/
final class Coroutine implements FutureLike {
/**
* Returns the coroutine id
*/
public function getId(): int {}

/**
* Request cancellation of this coroutine
*/
Expand Down