Skip to content

Commit 8a84f70

Browse files
committed
Merge pull request #48 from async-interop/underlying-loop-handle
Add getLoopHandle() for accessing the underlying loop
2 parents 13c93af + a020880 commit 8a84f70

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/LoopDriver.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,4 +159,15 @@ public function setErrorHandler(callable $callback = null);
159159
* @return bool
160160
*/
161161
public function supports($feature);
162+
163+
/**
164+
* Get the underlying loop handle.
165+
*
166+
* Example: the uv_loop resource for libuv or the EvLoop object for libev or null for a native driver
167+
*
168+
* Note: This function is *not* exposed in the Loop class; users shall access it directly on the respective loop instance.
169+
*
170+
* @return null|object|resource The loop handle the event loop operates on. Null if there is none.
171+
*/
172+
public static function getHandle();
162173
}

0 commit comments

Comments
 (0)