ErdbeerbaerLP / DiscordIntegration-Core

Common module for the Discord Integration mod
https://modrinth.com/plugin/dcintegration
4 stars 21 forks source link

Move all forking Threads to daemon worker thread. #145

Closed KoromaruKoruko closed 1 year ago

KoromaruKoruko commented 1 year ago

Constantly creating new threads is costly, thus I have implemented a generic WorkThread implementation. Use this class whenever you want to move work off-thread as it does not inquire the costs of allocating and creating a new thread.

Replaced all instances of empty string concatenation, to change types, into String.valueOf(*).

sonatype-lift[bot] commented 1 year ago

Sonatype Lift is retiring

Sonatype Lift will be retiring on Sep 12, 2023, with its analysis stopping on Aug 12, 2023. We understand that this news may come as a disappointment, and Sonatype is committed to helping you transition off it seamlessly. If you’d like to retain your data, please export your issues from the web console. We are extremely grateful and thank you for your support over the years.

📖 Read about the impacts and timeline

sonatype-lift[bot] commented 1 year ago

🛠 Lift Auto-fix

Some of the Lift findings in this PR can be automatically fixed. You can download and apply these changes in your local project directory of your branch to review the suggestions before committing.[^1]

# Download the patch
curl https://lift.sonatype.com/api/patch/github.com/ErdbeerbaerLP/DiscordIntegration-Core/145.diff -o lift-autofixes.diff

# Apply the patch with git
git apply lift-autofixes.diff

# Review the changes
git diff

Want it all in a single command? Open a terminal in your project's directory and copy and paste the following command:

curl https://lift.sonatype.com/api/patch/github.com/ErdbeerbaerLP/DiscordIntegration-Core/145.diff | git apply

Once you're satisfied, commit and push your changes in your project. [^1]: You can preview the patch by opening the patch URL in the browser.

ErdbeerbaerLP commented 1 year ago

Oh wrong branch

Will manually merge into the rewrite branch later today This change will be released with next update gets released (not 3.0.1, which currently is in release process)