Move from polling to worker thread #3

Merged
probablycorey merged 7 commits from worker-test into main 2025-11-19 21:21:05 +00:00

I was polling for new pin events, but that felt icky. So now we check for events by blocking, but it is in a worker thread! Now all that libgpio magic is in once place and in a worker. Makes cleanup easy and does a good job encapsulating that hairy code.

It does make a new worker for each input, which is fine for how we are using it. But if we wanted like 20+ inputs we might want to have one worker and group all the inputs. This isn't hard, but it is more complex. Since we don't need it now I punted on it.

cc @probablycorey

I was polling for new pin events, but that felt icky. So now we check for events by blocking, but it is in a worker thread! Now all that libgpio magic is in once place and in a worker. Makes cleanup easy and does a good job encapsulating that hairy code. It *does* make a new worker for each input, which is fine for how we are using it. But if we wanted like 20+ inputs we might want to have one worker and group all the inputs. This isn't hard, but it is more complex. Since we don't need it now I punted on it. cc @probablycorey
probablycorey added 6 commits 2025-11-19 21:03:57 +00:00
probablycorey added 1 commit 2025-11-19 21:19:22 +00:00
probablycorey merged commit a5751b28f7 into main 2025-11-19 21:21:05 +00:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: probablycorey/phone#3
No description provided.