thread::errorproc establishes a handler for errors that occur in commands that are executed via thread::send -async. This handler is process-global: It is shared by all threads, and it can be set from any thread.