mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-04 04:27:34 +00:00
So there's a bit of a nasty bug that arises from the GAM both handling drawing primitives and context swaps. In particular, because the GAM handles both of these in a single thread, context swaps can't block, because the redraws triggered by the context swap would be blocked, causing a deadlock. When the API token for the predictor was introduced, this added a blocking operation inside the context swap. This would cause a deadlock under certain conditions. This patch refactors the API token so that it's not a return result of swapping the predictors. Instead, the predictors return the API token as a non-blocking message to the GAM. This API token is correlated with the *GAM* token (not the app token). Present me thanks past me for adding the GAM token, which was as of yet unused, but now, there is a very sensible role for it-- exactly what it was made for, e.g. handling GAM-local API calls without disclosing the application token. Anyways, hopefully this patch puts the race condition to rest, while allowing us to have per-context prediction histories. |
||
|---|---|---|
| .. | ||
| src | ||
| Cargo.toml | ||