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

refactor: use unbounded channels #70

Merged
merged 1 commit into from
Apr 25, 2024

Conversation

aGFteg
Copy link
Contributor

@aGFteg aGFteg commented Apr 25, 2024

Resolves #69

@aGFteg aGFteg added the C-jarust Issue/PR for jarust core label Apr 25, 2024
@aGFteg aGFteg requested a review from Ghamza-Jd April 25, 2024 12:23
Copy link
Owner

@Ghamza-Jd Ghamza-Jd left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@@ -51,7 +51,7 @@ pub struct JaConnection {
impl JaConnection {
pub(crate) async fn open(config: JaConfig, transport: impl Transport) -> JaResult<Self> {
let (router, root_channel) = JaRouter::new(&config.namespace).await;
let transaction_manager = TransactionManager::new(BUFFER_SIZE);
let transaction_manager = TransactionManager::new(32);
Copy link
Owner

Choose a reason for hiding this comment

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

Surely not for this one, but we refactor this manager into a Redis cache-like implementation since doesn't make sense on another thought.
All channels had the same size as this manager, 2 channels half-full will overflow this manager.

@Ghamza-Jd Ghamza-Jd merged commit 258f5e2 into Ghamza-Jd:master Apr 25, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-jarust Issue/PR for jarust core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use unbounded channels for the router and events
2 participants