Solution to Task 6.1.7 Note the order in which the locks are taken. Updated for mbed os 5.4

Revision:
5:31707531f715
Parent:
0:f916cefba2f4