Silent

Results 209 comments of Silent

What happens to the concurrent jobs if the user leaves the scenes triggering them very fast? Seems like it's impossible to block on the runner task to wait before freeing...

> Your remark is perfectly valid though, I will make it more clear in the docs that the application is responsible for keeping all relevant contexts valid until the runner...

> @CookiePLMonster `concurrent_runner_timer_callback` function is lying on the mcu flash, so it will be safe to jump there @DrZlo13 Yes, but the `finish_callback` can still race with the other thread...

> The solution you have proposed won't work though, because we HAVE to wait on a queue in `view_dispatcher_send_custom_event()`, which is currently called in the `finished_callback` every time. Could you...

Looking at the revised approach - what happens if `furi_thread_start` and `furi_thread_set_callback` are called on a thread that hasn't finished yet? Do they wait for it to finish first or...

To add to that, the current layout of `DateTime` is sub-optimal, with the size of 10 bytes. Had `weekday` been moved ahead of `year`, it'd fit in the padding added...

Could maybe `aligned_malloc` be removed in favour of `aligned_alloc` while you're breaking API anyway? Less symbols and coincidentally also better conformance with the C standard, especially now that non-standard `aligned_free`...

> perhaps as suggested in #3574 and on discord contributor chat, could have along `malloc()` also a `malloc_nothrow()` that does not crash on size=0 or out of memory? i get...

Ah yes, for graceful error handling situations this could be OK. I was thinking about a situation of "if this is too much, try to allocate a little bit less...

Max heap size check is prone to a race though, unless the program checks the heap size **and** mallocs with the memory manager locked. A nothrow alloc abstracts this detail...