Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve performance for signal handling. #4

Open
lithdew opened this issue Nov 18, 2020 · 1 comment
Open

Improve performance for signal handling. #4

lithdew opened this issue Nov 18, 2020 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@lithdew
Copy link
Owner

lithdew commented Nov 18, 2020

PackedWaker / PackedList in waker.zig was quickly written and could possibly be improved. It takes a Set which is a packed struct of booleans representative of a bitset.

The PackedWaker is used for signal handling, where Set is the set of possible signals that a caller may suspend themselves on.

Upon the notification of a signal being received by a process, should any of the received signals match any callers waited-upon signals, the suspended caller would be resumed.

Once this feature is done, I will move signal handling on linux/darwin to utilize sigaction to be able to catch all signals directed towards a process unlike signalfd or kqueue EVFILT_SIGNAL to keep signal handling behavior consistent across platforms.

@lithdew lithdew changed the title Improve performanc for signal handling. Improve performance for signal handling. Nov 18, 2020
@lithdew lithdew added enhancement New feature or request help wanted Extra attention is needed labels Nov 18, 2020
@lithdew
Copy link
Owner Author

lithdew commented Nov 19, 2020

Signal handling on posix systems is now done via sigaction, and examples have been updated. The hope is to replace PackedWaker / PackedList with a condvar implementation as suggested by @kprotty.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant