You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@plc4x.apache.org by GitBox <gi...@apache.org> on 2023/01/02 14:01:32 UTC
[GitHub] [plc4x] nielsbasjes opened a new pull request, #724: fix: Improve java example
nielsbasjes opened a new pull request, #724:
URL: https://github.com/apache/plc4x/pull/724
Some improvements in the example:
- No need for close in a try-with-resources block.
- Move the exit outside the try-with-resources block.
- Use the CompletableFuture (which is the actual return type of execute) which has a `get()` that waits for the completion --> no need for an unreliable sleep.
- Document the need for the exit explicitly
--
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-unsubscribe@plc4x.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [plc4x] chrisdutz commented on pull request #724: fix: Improve java example
Posted by GitBox <gi...@apache.org>.
chrisdutz commented on PR #724:
URL: https://github.com/apache/plc4x/pull/724#issuecomment-1368975821
Well admittedly the sleep doesn't make any sense with the async stuff commented out.
Not quite sure why it's commented out at all. If we call "get" then the whole point of doing it asynchronously is lost.
But I think it makes sense to add a second example demonstrating the async behaviour. Perhaps with a hook that waits on a signal (strg+c) to shut down.
--
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-unsubscribe@plc4x.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: Improve java example (plc4x)
Posted by "chrisdutz (via GitHub)" <gi...@apache.org>.
chrisdutz merged PR #724:
URL: https://github.com/apache/plc4x/pull/724
--
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-unsubscribe@plc4x.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: Improve java example (plc4x)
Posted by "chrisdutz (via GitHub)" <gi...@apache.org>.
chrisdutz commented on PR #724:
URL: https://github.com/apache/plc4x/pull/724#issuecomment-1416002185
Sorry ... a bit turbulent on my side ... just merged it.
--
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-unsubscribe@plc4x.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: Improve java example (plc4x)
Posted by "nielsbasjes (via GitHub)" <gi...@apache.org>.
nielsbasjes commented on PR #724:
URL: https://github.com/apache/plc4x/pull/724#issuecomment-1415813462
@chrisdutz @ottlukas I just noticed this is still open.
Do you want to use this? Or are changes needed from my end? Or is this to be closed without being merged? Or ...
--
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-unsubscribe@plc4x.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [plc4x] chrisdutz commented on pull request #724: fix: Improve java example
Posted by GitBox <gi...@apache.org>.
chrisdutz commented on PR #724:
URL: https://github.com/apache/plc4x/pull/724#issuecomment-1368977436
And expanding all of the code ... yes ... your soltion is nicer ... just noticed it was a new future you were getting ;-)
So yes ... I think that option is nicer.
--
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-unsubscribe@plc4x.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org