bd12792 server/process: Avoid risk of exception deadlocks

Authored and Committed by Richard Purdie 2 years ago
    server/process: Avoid risk of exception deadlocks
    
    The open coded lock acquire/release in the UI event handler doesn't
    cover the case an exception occurs and if one did, it could deadlock
    the code. Switch to use 'with' statements which would handle this
    possibility.
    
    We have seen deadlocks in the UI at exit this so this removes a
    possible cause.
    
    Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
    
        
file modified
+9 -14