1. A system for implementing synchronization among threads in a workflow, said system comprising: a memory area for storing a plurality of work items in a scheduler queue, said one or more of the plurality of work items being organized hierarchically in an activity and being associated with the activity in a workflow, each of the work items being associated with a thread; a processor configured to execute computer-executable instructions for: assigning a synchronization handle to each of the work items in the scheduler queue, said synchronization handle indicating a particular shared resource to be accessed by the work item, said particular shared resource being shared by one or more of the work items; for each of the work items, computing a token value based on the assigned synchronization handle and a location of the work item in the hierarchy in the activity; sorting the work items into a synchronization queue based on the computed token value associated with each of the work items; and sequentially executing each of the sorted work items in the synchronization queue to serialize access to the particular shared resource and effect a synchronous execution of the threads associated with the work items.