The EvCheck class

(PECL ev >= 0.2.0)

Einführung

EvPrepare and EvCheck watchers are usually used in pairs. EvPrepare watchers get invoked before the process blocks, EvCheck afterwards.

It is not allowed to call EvLoop::run() or similar methods or functions that enter the current event loop from either EvPrepare or EvCheck watchers. Other loops than the current one are fine, however. The rationale behind this is that one don't need to check for recursion in those watchers, i.e. the sequence will always be: EvPrepare -> blocking -> EvCheck , so having a watcher of each kind they will always be called in pairs bracketing the blocking call.

The main purpose is to integrate other event mechanisms into libev and their use is somewhat advanced. They could be used, for example, to track variable changes, implement custom watchers, integrate net-snmp or a coroutine library and lots more. They are also occasionally useful to cache some data and want to flush it before blocking.

It is recommended to give EvCheck watchers highest( Ev::MAXPRI ) priority, to ensure that they are being run before any other watchers after the poll (this doesn’t matter for EvPrepare watchers).

Also, EvCheck watchers should not activate/feed events. While libev fully supports this, they might get executed before other EvCheck watchers did their job.

Klassenbeschreibung

class EvCheck extends EvWatcher {
/* Geerbte Eigenschaften */
public $is_active;
public $data;
public $is_pending;
public $priority;
/* Methoden */
public __construct( callable $callback , mixed $data = ?, int $priority = ?)
final public static createStopped( string $callback , string $data = ?, string $priority = ?): object
/* Geerbte Methoden */
public EvWatcher::clear(): int
public EvWatcher::feed( int $revents ): void
public EvWatcher::invoke( int $revents ): void
public EvWatcher::keepalive( bool $value = ?): bool
public EvWatcher::setCallback( callable $callback ): void
public EvWatcher::start(): void
public EvWatcher::stop(): void
}

Inhaltsverzeichnis

Hier Kannst Du einen Kommentar verfassen


Bitte gib mindestens 10 Zeichen ein.
Wird geladen... Bitte warte.
* Pflichtangabe
Es sind noch keine Kommentare vorhanden.

Was genau bedeutet "Vibe Coding"? Ein tiefgehender Blick für Entwickler

In der Welt der Softwareentwicklung gibt es unzählige Wege, wie man an ein Projekt herangeht. Manche schwören auf strikte Planung, andere auf bewährte Algorithmen und wieder andere lassen sich von etwas ganz anderem leiten: ihrem Gefühl. ...

admin

Autor : admin
Kategorie: Software & Web-Development

PHP cURL-Tutorial: Verwendung von cURL zum Durchführen von HTTP-Anfragen

cURL ist eine leistungsstarke PHP-Erweiterung, die es Ihnen ermöglicht, mit verschiedenen Servern über verschiedene Protokolle wie HTTP, HTTPS, FTP und mehr zu kommunizieren. ...

TheMax

Autor : TheMax
Kategorie: PHP-Tutorials

Midjourney Tutorial - Anleitung für Anfänger

Über Midjourney, dem Tool zur Erstellung digitaler Bilder mithilfe von künstlicher Intelligenz, gibt es ein informatives Video mit dem Titel "Midjourney Tutorial auf Deutsch - Anleitung für Anfänger" ...

Mike94

Autor : Mike94
Kategorie: KI Tutorials

Tutorial veröffentlichen

Tutorial veröffentlichen

Teile Dein Wissen mit anderen Entwicklern weltweit

Du bist Profi in deinem Bereich und möchtest dein Wissen teilen, dann melde dich jetzt an und teile es mit unserer PHP-Community

mehr erfahren

Tutorial veröffentlichen

How to celebrate a birthday in Berlin in an unusual way?

How is it organized? Is the route fixed or can you choose your own? I wonder how long the whole trip takes and are there any restrictions? ​

Geschrieben von einermeiner am 31.03.2025 23:47:53
Forum: Apps und PHP Script Gesuche
How to celebrate a birthday in Berlin in an unusual way?

Riding around Berlin with friends, enjoying drinks and fun is a great idea for a holiday or just a nice day out. This format is great for companie ...

Geschrieben von daberty am 31.03.2025 23:46:24
Forum: Apps und PHP Script Gesuche
How to celebrate a birthday in Berlin in an unusual way?

This year I want to do something out of the ordinary, not just sit in a bar. I think to gather friends and make the holiday more active, perhaps w ...

Geschrieben von einermeiner am 31.03.2025 23:38:10
Forum: Apps und PHP Script Gesuche
Google reCAPTCHA in Kontaktformular einbinden

json_decode(file_get_contents("https://www.google.com/recaptcha/api/siteverify?secret=".$secret."&response=".$captcha), true) eine gültige Antwor ...

Geschrieben von lauralorde am 31.03.2025 09:08:16
Forum: PHP Developer Forum