Thanks to visit codestin.com
Credit goes to github.com

Skip to content

UvDriver Signal Example Issue/Suggestion (100% cpu) #329

@duckboy81

Description

@duckboy81

I'm back with another one!

Was attempting to implement the signal handling demo examples/event-loop/signals.php and kept running into an issue where my script would catch the signal, hit exit(0) and hang at 100% cpu usage.

Switching from uv to the native driver seemed to work. But I was looking at a way to still use uv and it looks like swapping the exit call for a Loop::stop() call works well. The downside being that code execution stops at an arbitrary point after the Loop::run() line -- probably okay for the demo, but on a larger scale could be hard to manage.

I'll make a PR for it in a minute here.

php7.4/Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions