AsyncUnlock must be called after making any updates in a separate goroutine outside of the main configuration, rendering, and event handling structure. It must have a matching [WidgetBase.AsyncLock] before it.
()
| 43 | // outside of the main configuration, rendering, and event handling structure. |
| 44 | // It must have a matching [WidgetBase.AsyncLock] before it. |
| 45 | func (wb *WidgetBase) AsyncUnlock() { |
| 46 | rc := wb.Scene.renderContext() |
| 47 | if rc == nil { |
| 48 | return |
| 49 | } |
| 50 | rc.unlock() |
| 51 | if wb.Scene != nil { |
| 52 | wb.Scene.updating = false |
| 53 | } |
| 54 | } |
| 55 | |
| 56 | // NeedsRender specifies that the widget needs to be rendered. |
| 57 | func (wb *WidgetBase) NeedsRender() { |
no test coverage detected