Skip to content

Commit 5d53564

Browse files
committed
Throw in LibUvLoop when uv ext is missing
1 parent 68732b6 commit 5d53564

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/LibUvLoop.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ final class LibUvLoop implements LoopInterface
2424

2525
public function __construct()
2626
{
27+
if (!function_exists('uv_loop_new')) {
28+
throw new BadMethodCallException('Cannot create LibUvLoop, ext-uv extension missing');
29+
}
30+
2731
$this->uv = \uv_loop_new();
2832
$this->futureTickQueue = new FutureTickQueue();
2933
$this->timerEvents = new SplObjectStorage();

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy