Trial with threads and writing elements in parallel to data.
Next step is to add timing loops around this.
renamed locks to define as global.
Added code for readWrite lock testing.
BUT not sure this all works yet as seems to have inconsistent behaviour.