Skip to content

Conversation

hawkw
Copy link
Member

@hawkw hawkw commented Aug 13, 2021

Currently, callsites arrays always have 32 elements. This is fine for
task spans and waker ops. However, when adding async resources and async
operations, these will likely need to be much longer.

This PR changes the Callsites type to have a const generic parameter
for the maximum number of callsites. When using Callsites to track
async ops and resources, we can provide a much larger length value.

I also tuned the length of the two callsites arrays we're currently using, and
added a quick fmt::Debug impl for TasksLayer.

hawkw added 3 commits August 13, 2021 11:15
Currently, callsites arrays always have 32 elements. This is fine for
task spans and waker ops. However, when adding async resources and async
operations, these will likely need to be much longer.

This PR changes the `Callsites` type to have a const generic parameter
for the maximum number of callsites. When using `Callsites` to track
async ops and resources, we can provide a much larger length value
Signed-off-by: Eliza Weisman <[email protected]>
@hawkw hawkw merged commit 4f92ee3 into main Aug 14, 2021
@hawkw hawkw deleted the eliza/const-generify-callsites branch August 14, 2021 16:29
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.

2 participants