1. An apparatus comprising: a trigger-response mechanism that includes at least one bank of user-programmable registers; and a thread switch handler coupled to the trigger-response mechanism, the thread switch handler to invoke a second instruction stream responsive to an indication from the trigger-response mechanism that a user-defined trigger event has occurred during execution of a first instruction stream.