[jira] [Commented] (PROTON-2625) [protonj2] Update Netty to latest release
[ https://issues.apache.org/jira/browse/PROTON-2625?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17619130#comment-17619130 ] ASF subversion and git services commented on PROTON-2625: - Commit fde2f448c06a1f8602044eb8cae4ee30442f3295 in qpid-protonj2's branch refs/heads/main from Timothy Bish [ https://gitbox.apache.org/repos/asf?p=qpid-protonj2.git;h=fde2f448 ] PROTON-2625 Update Netty to 4.1.84.Final > [protonj2] Update Netty to latest release > - > > Key: PROTON-2625 > URL: https://issues.apache.org/jira/browse/PROTON-2625 > Project: Qpid Proton > Issue Type: Task > Components: protonj2 >Affects Versions: protonj2-1.0.0-M9 >Reporter: Timothy A. Bish >Assignee: Timothy A. Bish >Priority: Minor > Fix For: protonj2-1.0.0-M10 > > > Update Netty dependencies to latest -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org
[jira] [Created] (PROTON-2625) [protonj2] Update Netty to latest release
Timothy A. Bish created PROTON-2625: --- Summary: [protonj2] Update Netty to latest release Key: PROTON-2625 URL: https://issues.apache.org/jira/browse/PROTON-2625 Project: Qpid Proton Issue Type: Task Components: protonj2 Affects Versions: protonj2-1.0.0-M9 Reporter: Timothy A. Bish Assignee: Timothy A. Bish Fix For: protonj2-1.0.0-M10 Update Netty dependencies to latest -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org
[jira] [Commented] (PROTON-2438) [cpp] Cancellable tasks
[ https://issues.apache.org/jira/browse/PROTON-2438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17618840#comment-17618840 ] ASF GitHub Bot commented on PROTON-2438: DreamPearl commented on code in PR #379: URL: https://github.com/apache/qpid-proton/pull/379#discussion_r996953467 ## cpp/src/container_test.cpp: ## @@ -574,6 +575,119 @@ void test_container_mt_close_race() { } } +class schedule_cancel : public proton::messaging_handler { +proton::listener listener; +test_listen_handler listen_handler; +long long w1_handle; +long long w2_handle; +long long w3_handle; +long long w4_handle; +long long w5_handle; + +void change_w1_state(proton::container* c) { +w1_state = 1; +} + +void change_w2_state(proton::container* c) { +w2_state = 1; +} + +void change_w3_state(proton::container* c) { +w3_state = 1; +} + +void change_w4_state(proton::container* c) { +w4_state = 1; +} + +void change_w5_state(proton::container* c) { +w5_state = 1; +} + +void on_container_start(proton::container& c) override { +ASSERT(w1_state==0); +ASSERT(w2_state==0); +ASSERT(w3_state==0); +ASSERT(w4_state==0); +ASSERT(w5_state==0); + +listener = c.listen("//:0", listen_handler); + +// We will cancel this scheduled task before its execution. +w1_handle = c.schedule(proton::duration(250), proton::make_work(_cancel::change_w1_state, this, )); + +// We will cancel this scheduled task before its execution and will try to cancel it again. +w2_handle = c.schedule(proton::duration(260), proton::make_work(_cancel::change_w2_state, this, )); + +// We will not cancel this scheduled task. +w3_handle = c.schedule(proton::duration(55), proton::make_work(_cancel::change_w3_state, this, )); + +// We will try to cancel this task before its execution from different thread i.e connection thread. +w4_handle = c.schedule(proton::duration(270), proton::make_work(_cancel::change_w4_state, this, )); + +// We will try to cancel this task after its execution from different thread i.e. connection thread. +w5_handle = c.schedule(proton::duration(50), proton::make_work(_cancel::change_w5_state, this, )); + +// Cancel the first scheduled task. +c.cancel(w1_handle); + +// Try cancelling the second scheduled task two times. +c.cancel(w2_handle); +c.cancel(w2_handle); + +// Try cancelling invalid work handle. +c.cancel(-1); +c.auto_stop(false); +} + +// Get here twice - once for listener, once for connector +void on_connection_open(proton::connection ) override { +c.close(); +} + +void on_connection_close(proton::connection ) override { +// Cross-thread cancelling + +ASSERT(w4_state==0); +// Cancel the fourth task before its execution. +c.container().cancel(w4_handle); + +// To make sure fifth task has been executed by now. +std::this_thread::sleep_for(std::chrono::milliseconds(60)); + +ASSERT(w5_state==1); +// Cancel the already executed fifth task. +c.container().cancel(w5_handle); + +c.container().stop(); +} Review Comment: @astitcher > [cpp] Cancellable tasks > --- > > Key: PROTON-2438 > URL: https://issues.apache.org/jira/browse/PROTON-2438 > Project: Qpid Proton > Issue Type: Improvement > Components: cpp-binding >Reporter: Božo Dragojevič >Assignee: Justin Ross >Priority: Major > > Allow scheduled tasks to be cancelled. > A cancelled task does not keep reactor from stoping running -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org
[GitHub] [qpid-proton] DreamPearl commented on a diff in pull request #379: PROTON-2438: [cpp] Cancellable tasks
DreamPearl commented on code in PR #379: URL: https://github.com/apache/qpid-proton/pull/379#discussion_r996953467 ## cpp/src/container_test.cpp: ## @@ -574,6 +575,119 @@ void test_container_mt_close_race() { } } +class schedule_cancel : public proton::messaging_handler { +proton::listener listener; +test_listen_handler listen_handler; +long long w1_handle; +long long w2_handle; +long long w3_handle; +long long w4_handle; +long long w5_handle; + +void change_w1_state(proton::container* c) { +w1_state = 1; +} + +void change_w2_state(proton::container* c) { +w2_state = 1; +} + +void change_w3_state(proton::container* c) { +w3_state = 1; +} + +void change_w4_state(proton::container* c) { +w4_state = 1; +} + +void change_w5_state(proton::container* c) { +w5_state = 1; +} + +void on_container_start(proton::container& c) override { +ASSERT(w1_state==0); +ASSERT(w2_state==0); +ASSERT(w3_state==0); +ASSERT(w4_state==0); +ASSERT(w5_state==0); + +listener = c.listen("//:0", listen_handler); + +// We will cancel this scheduled task before its execution. +w1_handle = c.schedule(proton::duration(250), proton::make_work(_cancel::change_w1_state, this, )); + +// We will cancel this scheduled task before its execution and will try to cancel it again. +w2_handle = c.schedule(proton::duration(260), proton::make_work(_cancel::change_w2_state, this, )); + +// We will not cancel this scheduled task. +w3_handle = c.schedule(proton::duration(55), proton::make_work(_cancel::change_w3_state, this, )); + +// We will try to cancel this task before its execution from different thread i.e connection thread. +w4_handle = c.schedule(proton::duration(270), proton::make_work(_cancel::change_w4_state, this, )); + +// We will try to cancel this task after its execution from different thread i.e. connection thread. +w5_handle = c.schedule(proton::duration(50), proton::make_work(_cancel::change_w5_state, this, )); + +// Cancel the first scheduled task. +c.cancel(w1_handle); + +// Try cancelling the second scheduled task two times. +c.cancel(w2_handle); +c.cancel(w2_handle); + +// Try cancelling invalid work handle. +c.cancel(-1); +c.auto_stop(false); +} + +// Get here twice - once for listener, once for connector +void on_connection_open(proton::connection ) override { +c.close(); +} + +void on_connection_close(proton::connection ) override { +// Cross-thread cancelling + +ASSERT(w4_state==0); +// Cancel the fourth task before its execution. +c.container().cancel(w4_handle); + +// To make sure fifth task has been executed by now. +std::this_thread::sleep_for(std::chrono::milliseconds(60)); + +ASSERT(w5_state==1); +// Cancel the already executed fifth task. +c.container().cancel(w5_handle); + +c.container().stop(); +} Review Comment: @astitcher -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org