Skip to content

Conversation

@jepler
Copy link

@jepler jepler commented May 27, 2025

This is a newer abstraction in micropython; it'll for instance allow background tasks to be checked once per ms in the internal select module modselect.

Because MICROPY_INTERNAL_EVENT_HOOK is used in a few locations, our own CIRCUITPY-CHANGE call to RUN_BACKGROUND_TASKS can be nixed. Specifically, mp_event_handle_nowait calls MICROPY_INTERNAL_EVENT_HOOK so paths from it don't need RUN_BACKGROUND_TASKS anymore.

However, while I'm traveling, I don't have access to hardware, so this is actually untested.

This is a newer abstraction in micropython; it'll for instance
allow background tasks to be checked once per ms in the internal
select module modselect.

Because `MICROPY_INTERNAL_EVENT_HOOK` is used in a few locations,
our own CIRCUITPY-CHANGE call to `RUN_BACKGROUND_TASKS` can be
nixed. Specifically, `mp_event_handle_nowait` calls
`MICROPY_INTERNAL_EVENT_HOOK` so paths from it don't need
`RUN_BACKGROUND_TASKS` anymore.
@dhalbert
Copy link
Collaborator

I will be doing a MicroPython merge soon so I think I will wait on this a bit.

@tannewt
Copy link
Member

tannewt commented Jul 11, 2025

I will be doing a MicroPython merge soon so I think I will wait on this a bit.

Can we finish this now since the merges are complete?

Copy link
Collaborator

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense to me. MICROPY_INTERNAL_EVENT_HOOK is invoked by mp_event_handle_nowait(), so this is a simple change that removes a difference from upstream. Thanks!

@dhalbert dhalbert merged commit 134a77f into adafruit:main Sep 24, 2025
617 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants