You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@eventmesh.apache.org by GitBox <gi...@apache.org> on 2021/05/10 21:38:18 UTC

[GitHub] [incubator-eventmesh] jinrongluo opened a new pull request #338: [Issue #337]

jinrongluo opened a new pull request #338:
URL: https://github.com/apache/incubator-eventmesh/pull/338


   Fix issue #337 
   
   Http Test Subscriber is not able to startup due to the Thread.sleep is blocking the main startup thread.  Moving the Thread.sleep code inside the internal child thread (stopThread) will fix this issue.


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] jinrongluo commented on pull request #338: [Issue #337] Fix Http Test Subscriber startup issue by moving the Thread.sleep into the child thread

Posted by GitBox <gi...@apache.org>.
jinrongluo commented on pull request #338:
URL: https://github.com/apache/incubator-eventmesh/pull/338#issuecomment-837585094


   > This pr may solve this problem. But I would like to address some points: 1. Try your best to keep away the sleep calling in any case. In this context, you'd better make produce and consume in one case, when countdown latch is zero, you could call System.exit. 2. As for Runtime calling, you could replace it with context.registerShutdownHook() to delegate spring bean lifecycle management.
   
   Thanks @vongosling Using countdown latch is a good suggestion for avoiding Thread.sleep.


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] vongosling commented on pull request #338: [Issue #337] Fix Http Test Subscriber startup issue by moving the Thread.sleep into the child thread

Posted by GitBox <gi...@apache.org>.
vongosling commented on pull request #338:
URL: https://github.com/apache/incubator-eventmesh/pull/338#issuecomment-837574492


   This pr may solve this problem. But I would like to address some points: 1. Try your best to keep away the sleep calling in any case. In this context, you'd better make produce and consume in one case, when countdown latch is zero, you could call System.exit. 2. As for Runtime calling, you could replace it with context.registerShutdownHook() to delegate spring bean lifecycle management.


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] xwm1992 merged pull request #338: [Issue #337] Fix Http Test Subscriber startup issue by moving the Thread.sleep into the child thread

Posted by GitBox <gi...@apache.org>.
xwm1992 merged pull request #338:
URL: https://github.com/apache/incubator-eventmesh/pull/338


   


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org