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 consumer methods to the task scheduler #7264

Merged
merged 2 commits into from
Apr 12, 2024
Merged

Conversation

Warriorrrr
Copy link
Member

@Warriorrrr Warriorrrr commented Feb 18, 2024

Description:

Replaces runnable params with consumers for cases where we'd want to get the task from inside itself.

The run, runLater and runRepeating on methods on folia will also now use the async scheduler by default since there was no reason for them to use the global one, new runGlobal methods have been added for things that actually do need to run on the global thread (currently none)


  • I have tested this pull request for defects on a server.

By making this pull request, I represent that I have the right to waive copyright and related rights to my contribution, and agree that all copyright and related rights in my contributions are waived, and I acknowledge that the TownyAdvanced organization has the copyright to use and modify my contribution under the Towny License for perpetuity.

@Warriorrrr Warriorrrr added this to the 0.100.2.0 milestone Feb 18, 2024
@LlmDl LlmDl modified the milestones: 0.100.2.0, 0.100.3.0 Mar 29, 2024
@Warriorrrr Warriorrrr force-pushed the feat/task-scheduler-refactor branch from 2663814 to 36ef416 Compare April 2, 2024 21:14
@Warriorrrr Warriorrrr marked this pull request as ready for review April 2, 2024 21:29
@Warriorrrr Warriorrrr changed the title Refactor the task scheduler Add consumer methods to the task scheduler Apr 2, 2024
@LlmDl LlmDl merged commit 70d4be1 into master Apr 12, 2024
4 checks passed
@LlmDl LlmDl deleted the feat/task-scheduler-refactor branch April 12, 2024 20:39
LlmDl added a commit that referenced this pull request Apr 12, 2024
towny spawn cancelled via moving, damage, or via the TownyAPI class.
    - Closes #7353.
  - Skip processing claim particles for unloaded chunks, courtesy of
Warrior with PR #7351.
  - Add consumer methods to the task scheduler, courtesy of Warrior with
PR #7264.
  - Bump org.apache.maven.plugins:maven-compiler-plugin from 3.12.1 to
3.13.0.
  - Bump com.github.seeseemelk:MockBukkit-v1.20 from 3.78.0 to 3.80.0.
  - Bump org.apache.maven.plugins:maven-source-plugin from 3.3.0 to
3.3.1.
  - Bump org.apache.commons:commons-compress from 1.26.0 to 1.26.1.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants