Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for async metrics, make world size the first async metric #220

Merged
merged 2 commits into from
Feb 2, 2024

Conversation

radiant-ai
Copy link
Contributor

@radiant-ai radiant-ai commented Feb 1, 2024

Fixes #155

Added support for async metrics. The metrics that can run off the main thread may override isAsyncCapable method. Such metrics will be run off the main thread while all other metrics will still get scheduled on the main thread.

Works fine for me with 0 high ticks with this world:
image

P.S. This might be a step forward to Folia support as it uses schedulers there. With async support we can safely call a mix of Folia schedulers and traditional spigot api methods.

@sladkoff
Copy link
Owner

sladkoff commented Feb 2, 2024

@radiant-ai Nice, thank you! I tested this locally and it works quite well.

@sladkoff sladkoff merged commit 525b06d into sladkoff:master Feb 2, 2024
1 check passed
@sladkoff sladkoff added this to the 3.0.0 milestone Feb 29, 2024
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.

World size metric lags server with big world
2 participants