Skip to content
This repository was archived by the owner on Oct 12, 2025. It is now read-only.

Conversation

@WhyNotHugo
Copy link
Contributor

@WhyNotHugo WhyNotHugo commented Aug 30, 2025

  • Disable multi-threaded rt; we don't need additional threads.
  • Avoid blocking locks; we can just use async locks.
  • Remove async from functions that don't need it.

We're not doing anything CPU intensive not lots of filesystem I/O. We
don't need multiple threads.
This task spawns a new thread which takes a blocking lock on a mutex.
Just take a non-blocking lock on the current thread.
This was referenced Aug 30, 2025
@pr2502
Copy link
Owner

pr2502 commented Aug 30, 2025

ok i see you addressed my comment before i managed to type it out :D (meant to reply this on #91)

@pr2502
Copy link
Owner

pr2502 commented Aug 30, 2025

i don't remember why i decided to make all the get_status functions non-async but i don't see why it'd be a problem to switch to async so sure, with the inner lock taken care of i think it's ok

}

#[tokio::main]
#[tokio::main(flavor = "current_thread")]
Copy link
Owner

Choose a reason for hiding this comment

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

i want to try this out before merging if it doesn't cause any issues (if it does that would be a bug, but still i don't want to merge it before testing). please let me know when you consider the PR ready

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ready now :)

Copy link
Owner

Choose a reason for hiding this comment

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

oki^^ i'll try to test it soon and if i don't see any weird behaviour we can merge

@pr2502
Copy link
Owner

pr2502 commented Sep 10, 2025

i've played around with the patched version and haven't run into any issues. thanks for the contribution^^

@pr2502 pr2502 merged commit 9ae41b1 into pr2502:main Sep 10, 2025
1 check passed
pr2502 pushed a commit that referenced this pull request Oct 12, 2025
* Disable multi-thread RT

We're not doing anything CPU intensive not lots of filesystem I/O. We
don't need multiple threads.

* Remove pointless blocking task

This task spawns a new thread which takes a blocking lock on a mutex.
Just take a non-blocking lock on the current thread.

* Avoid blocking locks

* Remove unnecessary async/await

* Disable unused tokio features
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants