I think the docstring should give a clearer indication that this function is intended for use in multithreaded situations (and in particular, in situations where you expect a different thread from the calling thread to effect the trait change).