1. A method, comprising: receiving source code including source code statements; processing the source code statements to determine a dependency of the statements; determining multiple groups of statements from the determined dependency of the statements, wherein statements in one group are dependent on one another; inserting at least one directive in the source code, wherein each directive is associated with one group of statements; and generating resulting threaded code including the inserted at least one directive, wherein the group of statements to which the directive in the resulting threaded code applies are processed as a separate task, wherein each group of statements designated by the directive to be processed as a separate task may be processed concurrently with respect to other groups of statements.