Method, apparatus, and program means for a programmable event driven yield
mechanism that may activate other threads. In one embodiment, an
apparatus includes execution resources to execute a plurality of
instructions and a monitor to detect a condition indicating a low level
of progress. The monitor can disrupt processing of a program by
transferring to a handler in response to detecting the condition
indicating a low level of progress. In another embodiment, thread switch
logic may be coupled to a plurality of event monitors which monitor
events within the multithreading execution logic. The thread switch logic
switches threads based at least partially on a programmable condition of
one or more of the performance monitors.