-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
Ongoing Schedule work: crashes in use case: nested schedule_recurrent_function_us() #6235
Comments
@dok-net you're right. I updated the #6234 documentation about this fact, thanks. About #6139 this is a huge PR with 25 files changed. So it will take time to be reviewed by maintainers. If this feature is important, please explain what would be the use case for a recurrent scheduled function to create from inside another recurrent scheduled function. |
I don't know, just general expectation, if it's documented as non-permissible, fine. Just making up a use case, is when recurrence is not desired, but delay is needed (return false on first call) - changing the "handler" and the next delay would be implemented as scheduling from inside such a function (?). |
Nothing is deleted. Your message has just been moved to the right issue, reference is above. edit: "I wonder why you didn't notice and nobody pointed it out for you" is that typical kind of message you are used to throw down at people which is not meant to keep everybody in good mood.
That might be a use case, yes (?). |
@d-a-v Thanks for moving the heads-up to the other "thread". |
This is getting ahead of me, I am sorry. I really do mean to express that I am surprised by the fact and that I wonder if there was/is a reason. There is no cause to think that the other person didn't feel let down. Direct technical rhetoric is quite common everywhere else, so please stay calm.
You don't sound convinced. In other news, the performance of the LIFO is (surprisingly much) better than that of the (combined) FIFO. I extensively reviewed one of the (Arduino) Scheduler ports, which unfortunately didn't work on master of Esp8266 Arduino, I haven't tried the original release points to verify if it did before. It required patching most of the externals in core_esp8266_main.cpp et al to be weak references in order to override them. While such an API seems more natural at first sight, I believe the function scheduling is more appropriate on an embedded device with little stack space to begin with. I wonder what the implications of switching to Free RTOS will be on the ESP8266, sticking to a 2-task model seems sensible even then, and is less likely to cause irritations with backports of ongoing library etc. work for applications sticking to the NONOS-SDK. A reminder from that, though, is that fair scheduling is not a given. Porting an increasing number of libraries to a scheduler, and sketches implementing FSMs and other asynchronous practices using it, could lead to starvation if it's not done right. This is just thought food, I do not state that the implementation does in fact suffer such a shortcoming. |
Were you ?
Well then, because I am not calm enough, I will let others answering to you. |
Fixed in PR #6485 |
@d-a-v As discussed - I hope I understood you right and this is indeed supposed to work, otherwise forget about it - here's runnable code. Works out-of-the-box in #6139, crashes in master HEAD. Playing with different values for repeat_us, either crashes later, or goes it WDT reset.
Sketch:
Stack decode:
The text was updated successfully, but these errors were encountered: