Patent ID: 6560626
Filing Date: 2003-05-06
Classification: G06F

Abstract:
A computer system comprising:a processing unit; a system memory coupled to the processing unit through a system bus; a computer readable medium coupled to the processing unit through a system bus; a multi-threaded runtime environment executed from the computer-readable medium by the processing unit, wherein the runtime environment comprises: an interruptible wait/sleep service; an asynchronous program call (APC) service; and an exception handling service; and a thread interruption function executed from the computer-readable medium by the processing unit for running within the runtime environment, wherein the thread interruption function comprises: a sleep operation that invokes the interruptible wait/sleep service to place a thread in an alertable blocked state; and a callback routine that is executed by the runtime environment in response to an interrupting thread causing an APC associated with the callback routine to be queued against the blocked thread, wherein executing the callback routine causes the wait/sleep service to exit back to the sleep operation so that an exception associated with the APC is captured by the exception handling service and the runtime environment activates the blocked thread to process the exception.