Skip to content

The equivalent of StreamSelectDriver::getTimeout in EvDriver #97

Answered by trowski
wtsergo asked this question in Q&A
Discussion options

You must be logged in to vote

Not in a simple way, no.

There's not a good solution to poll mysql connections within the event loop because ext-mysqli doesn't expose a socket which can be polled like, for example, ext-pgsql.

The best solution is likely a short repeating timer which calls mysqli::poll() with either a very short or zero timeout.

Instead though I'd recommend you check out amphp/mysql, which has IMO a better interface than ext-mysqli and has full async support.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@wtsergo
Comment options

Answer selected by wtsergo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants