We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 06fd353 + e716aab commit 7938338Copy full SHA for 7938338
composer.json
@@ -8,7 +8,7 @@
8
},
9
"autoload": {
10
"psr-4": {
11
- "Interop\\Async\\Awaitable\\": "src/"
+ "Interop\\Async\\": "src/"
12
}
13
14
src/Awaitable.php
@@ -0,0 +1,18 @@
1
+<?php
2
+
3
+namespace Interop\Async;
4
5
+/**
6
+ * Awaitable object representing the future value of an asynchronous operation.
7
+ */
+interface Awaitable
+{
+ /**
+ * Registers a callback to be invoked when the awaitable is resolved.
+ *
+ * @param callable(\Throwable|\Exception|null $exception, mixed $result) $onResolved
15
+ * @return void
16
17
+ public function when(callable $onResolved);
18
+}
src/Whenable.php
0 commit comments