Closed thiagokokada closed 3 years ago
Another thing: nowadays ExecutorBlock
's click_handler()
and signal_handler()
methods are async. We could implement a click_handler_sync()
and signal_handler_sync()
that can be used as synchronous alternatives, and call them in click_handler()
and signal_handler()
with run_async
.
So we don't need to care about the difference between sync/async when using ExecutorBlock
, at all. In case the async version is needed, we can always override {click,signal}-handler()
methods.
Of course, PollingExecutorBlock
would have the same methods too.
Closed by #120.
This is a combination of
PollingBlock
andExecutorBlock
(not necessary it will use multiple inheritance, while Python supports this it can be messy), allowing completely synchronous libraries to be integrated with i3pyblocks using a polling strategy.We can convert
i3pyblocks.blocks.x11.CaffeineBlock
as an example of this block.