1. A method of preempting execution of program instructions in a multi-threaded system, the method comprising: executing program instructions in a processing pipeline within the multi-threaded system using a first context; preempting execution using the first context to execute different program instructions in the multi-threaded system using a second context; invoking a preemption-restore kernel that encodes a preemption restore processing task as a task metadata (TMD) for execution when the first context is restored; and executing the different program instructions in the processing pipeline using the second context.