This function is not thread-safe. Is that wise?