Multithreading: fields declared volatile where necessary