Skip to content

Conversation

@Kitt3120
Copy link
Contributor

@Kitt3120 Kitt3120 commented Oct 4, 2024

This pull request introduces several significant changes to the EventRepeater and ServiceManager components, focusing on replacing Arc with Weak references to prevent potential memory leaks and improve error handling. The most important changes include updating the initialization logic and error handling mechanisms.

EventRepeater Improvements:

ServiceManager Enhancements:

  • src/service/service_manager.rs: Updated the ServiceManager to use Weak references instead of Arc for self-referencing, and added error handling for setting and upgrading Weak references. [1] [2] [3]

@Kitt3120 Kitt3120 added the refactor Optimizes or restructures code label Oct 4, 2024
@Kitt3120 Kitt3120 self-assigned this Oct 4, 2024
@Kitt3120 Kitt3120 linked an issue Oct 4, 2024 that may be closed by this pull request
@Kitt3120 Kitt3120 enabled auto-merge (squash) October 4, 2024 20:48
@Kitt3120 Kitt3120 disabled auto-merge October 4, 2024 20:59
@Kitt3120 Kitt3120 merged commit fd42094 into staging Oct 4, 2024
6 checks passed
@Kitt3120 Kitt3120 deleted the refactor/services-weak-references branch October 4, 2024 20:59
@Kitt3120 Kitt3120 restored the refactor/services-weak-references branch October 4, 2024 22:14
@Kitt3120 Kitt3120 deleted the refactor/services-weak-references branch October 4, 2024 22:15
Kitt3120 added a commit that referenced this pull request Oct 5, 2024
* add: Cargo.lock file

* Update dependabot.yml

* Merge refactor/service-weak-references into staging (#58)

refactor: use Weak instead of Arc self-references

* Merge refactor/once-cell into staging (#62)

refactor: use OnceLock instead of SetLock

- Use OnceLock where SetLock was previously used
- Remove SetLock

* Merge refactor/async into staging (#63)

refactor: use async_trait where possible

* Merge feature/cargo-optimizations into staging (#64)

add: Cargo.toml settings

* fix: bump version to 0.3.0
Kitt3120 added a commit that referenced this pull request Oct 5, 2024
* add: Cargo.lock file

* Update dependabot.yml

* Merge refactor/service-weak-references into staging (#58)

refactor: use Weak instead of Arc self-references

* Merge refactor/once-cell into staging (#62)

refactor: use OnceLock instead of SetLock

- Use OnceLock where SetLock was previously used
- Remove SetLock

* Merge refactor/async into staging (#63)

refactor: use async_trait where possible

* Merge feature/cargo-optimizations into staging (#64)

add: Cargo.toml settings

* fix: bump version to 0.3.0

* fix: cartes.io publishing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Optimizes or restructures code

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Weak references

2 participants