Ah, so your timings weren't for the gpiod example itself. That makes sense then.
The async/threading option is tedious to write, but it really isn't hard to do in Python, and gpiod provides both blocking and non-blocking building blocks for you to use as you see fit. The purpose of the async example is to demonstrate how to integrate the GPIO events into your own async poll-based reactor. There is a blocking alternative that might suit you better - just run something like that in its own Python thread. You could think of that thread as the ISR for the button.
Can't say I'm a fan of gpiozero or lgpio. The devs for both have long been aware of this issue and have done literally nothing, so those libs are effectively abandon-ware in my book. You are better off switching to gpiod which is actively maintained.
The async/threading option is tedious to write, but it really isn't hard to do in Python, and gpiod provides both blocking and non-blocking building blocks for you to use as you see fit. The purpose of the async example is to demonstrate how to integrate the GPIO events into your own async poll-based reactor. There is a blocking alternative that might suit you better - just run something like that in its own Python thread. You could think of that thread as the ISR for the button.
Can't say I'm a fan of gpiozero or lgpio. The devs for both have long been aware of this issue and have done literally nothing, so those libs are effectively abandon-ware in my book. You are better off switching to gpiod which is actively maintained.
Statistics: Posted by warthog618 — Tue Mar 11, 2025 12:43 pm