Pergunta de entrevista da empresa X

Write a function that returns a random element from a list. What happens when there's another thread writing to this list and you want to make get_random threadsafe?