-
Notifications
You must be signed in to change notification settings - Fork 0
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
fix(ipc_shared_ptr): prohibit copying without is_created_by_borrow #303
Conversation
これってそもそも move なのでは...? |
sub側でのcopyは制限していない (created_by_borrowが動作に影響しない) ので、moveと等価ではないです。 |
単なる確認です。 |
石川さんと相談して、Descriptionに書いたような使い方は想定外なので、borrowとpublishの回数が必ず同じになるような実装にしようという話になりました。コピーしてpublishしたいユースケースも思いつかないので、良いのではと思っています。 |
たしかに、sub 側はめっちゃコピーされますね。copy 自体禁止にするのは無理そうです。 |
@みなさん |
|
みなさんGod Jobです! |
Description
need_rc_update=false
つまり、borrow_loaned_message()
で生成された ipc_shared_ptr がコピーされることは想定外の使い方なので、エラーで落とすようにしました。borrow_loaned_message() -> copy*n -> publish()*n
という操作を防止することを意図しています。Related links
実装議論
How was this PR tested?
Notes for reviewers