Patent ID: 9003413
Filing Date: 2015-04-07
Classification: G06F

Abstract:
1. A method of synchronizing a main thread and a slave thread, comprising: obtaining an initial work unit at the main thread; dividing the initial work unit into a first work unit and another work unit; sending, via a wake-up message, the first work unit from the main thread to the slave thread; and processing the other work unit at the main thread; transitioning the slave thread from a sleep state to a spin-lock state in response to the wake-up message from the main thread; transitioning the slave thread out of the spin-lock state to process the first work unit from the main thread; determining, at the main thread that executes on a processor, an elapsed time period until receipt of a second work unit for the slave thread, wherein the act of determining the elapsed time period is performed before the receipt of the second work unit; transitioning the slave thread to the spin-lock state if the elapsed time period satisfies a threshold time period; and transitioning the slave thread to the sleep state if the elapsed time period does not satisfy the threshold time period.