Skip to content

[tizen_rpc_port] Support multiple stubs in one app - #1189

Open
JSUYA wants to merge 1 commit into
flutter-tizen:mainfrom
JSUYA:fix/tizen-rpc-port-lifecycle
Open

JSUYA wants to merge 1 commit into
flutter-tizen:mainfrom
JSUYA:fix/tizen-rpc-port-lifecycle

Conversation

@JSUYA

@JSUYA JSUYA commented Oct 20, 2026

Copy link
Copy Markdown
Member

All stubs shared a single event channel and native event sink, so only the stub that called listen() last received events. close() also destroyed the native handle that the finalizer later destroyed again.

Give each stub its own event channel so several stubs can listen at the same time, and make close() release the native handle exactly once. Calling close() again returns the same completion, and any operation on a closed stub throws StateError.

@JSUYA JSUYA self-assigned this Oct 20, 2026
@JSUYA JSUYA added the enhancement New feature or request label Oct 20, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-20T09:24:29.980499Z 5955a75 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 259c0c2a03

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/tizen_rpc_port/example/client/integration_test/rpc_lifecycle_test.dart Outdated
Comment thread packages/tizen_rpc_port/lib/src/stub_base.dart Outdated
All stubs shared a single event channel and native event sink, so only the
stub that called listen() last received events. close() also destroyed the
native handle that the finalizer later destroyed again.

Give each stub its own event channel so several stubs can listen at the same
time, and make close() release the native handle exactly once. Calling
close() again returns the same completion, and any operation on a closed
stub throws StateError. listen() now completes after the stub's channel is
set up and throws when that setup fails, like ProxyBase.connect().

The lifecycle suite in example/client/integration_test/rpc_lifecycle.dart
needs example/server/integration_test/rpc_server.dart running in another
terminal, so it is kept out of automatic test discovery.
@JSUYA
JSUYA force-pushed the fix/tizen-rpc-port-lifecycle branch from 259c0c2 to 5955a75 Compare October 20, 2026 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request p: tizen_rpc_port

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant