mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-22 05:59:25 +00:00
apps/examples/pwfb/pwfb_main.c: Temporarily work around a race condition by adding a delay.
This commit is contained in:
parent
9cd5d5c9ac
commit
51befb3fa7
1 changed files with 11 additions and 0 deletions
|
|
@ -396,6 +396,17 @@ static bool pwfb_configure_window(FAR struct pwfb_state_s *st, int wndx,
|
|||
goto errout_with_hwnd;
|
||||
}
|
||||
|
||||
/* There is a race condition which we resole by simply waiting a bit here:
|
||||
* In order for the size and position to take effect, a command is sent to
|
||||
* server which responds with an event. So we need to synchronize at this
|
||||
* point, or the following fill will fail.
|
||||
*
|
||||
* REVISIT: Here a dumb wait is used. It be better to have a firm
|
||||
* handshake to when the new size and position are in effect.
|
||||
*/
|
||||
|
||||
usleep(500 * 1000);
|
||||
|
||||
/* Create a bounding box. This is actually too large because it does not
|
||||
* account for the boarder widths. However, NX should clip the fill to
|
||||
* stay within the frame.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue