-
Notifications
You must be signed in to change notification settings - Fork 60
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
Make handling commands non-blocking via optional async mode #75
base: feature/async
Are you sure you want to change the base?
Conversation
This rewrite does make the handling of the commands non-blocking, so you can use it along with other tasks on the node. The interface of the library is kept the same as much as possible.
This is quite a big (huge) rewrite, so you may also consider it is not really fitting as a pull request for your library. |
Apparently Travis failed over the (not yet updated) examples. |
Wow that is quite an impressive change. Thanks for the contribution! @jwillemsen what do you think? Should we merge this in? I'm of the opinion that it can be merged in as long as backwards compatibility is kept (or with minor changes). Also the other Arduino RN2xx3 library - The Things Network library - does things in a synchronous manner, so being asynchronous gives this library a new meaning to exist. |
I am running it in my ESPEasy project as a controller, so it does need to do a lot of other stuff in the background on an ESP8266. The used timeouts are:
|
Lot of changes, haven't look at in detail but there is no new example that shows how to use the async feature, without that it is hard for anyone other to use. That example should also be compiled on travis |
Yes. A library lives or dies not on the quality of its code, but on the
quality of its documentation.
…On Mon, 17 Feb 2020, 07:38 Johnny Willemsen, ***@***.***> wrote:
Lot of changes, haven't look at in detail but there is no new example that
shows how to use the async feature, without that it is hard for anyone
other to use. That example should also be compiled on travis
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#75?email_source=notifications&email_token=AFAGDCV5BIMBVDN3PYFF5HDRDI5GTA5CNFSM4KWFPLPKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEL5LJ2I#issuecomment-586855657>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFAGDCX6GIERGL7VMTWHOX3RDI5GTANCNFSM4KWFPLPA>
.
|
Sure I will add an example to use the async mode. |
This is some example for to illustrate the async mode.
I just added a simple example to illustrate the async mode, but have still to test it myself. Maybe you can also test it yourself, and I will later test it myself too and let you know if it is working :) N.B. I guess there should also be something written about this in documentation files? |
The example code using the library should not make assumptions about the async mode, but check with the library to know what mode is active.
Just my two cents, found this library a few days ago and want to adapt for a current project not on Arduino, this PR almost totally rewrites the whole library IMHO. |
That's also fine with me. @jpmeijers Please let me know what you think is best to do, merge this or consider it a forked library? |
It seems like after merging your first PR #66 this one has conflicts and can't be merged. |
I will have a look at it. |
OK, was working for 40-ish minutes on the merge, then another commit was merged so it would not allow me to commit my merge. :( Will take another look later today (or tomorrow) |
Sorry for that. I was trying to clean up old trivial PRs which only changes single lines and should not break merges. Funny though, because this PR is pointing to a dedicated branch which should not have changed. No rush, I'm the one that is years behind on admin on this project. Thanks a lot for all the contributions you made over the years. |
Merges via GitHub (not local) will no longer be accepted when the main branch changed. So then I lost the possibility to commit them. I will later try to merge it locally, as that does give more insights in what was changed in the main branch. |
This rewrite does make the handling of the commands non-blocking, so you can use it along with other tasks on the node.
The interface of the library is kept the same as much as possible.