1. A computer implemented method performing operations with respect to a computer readable storage medium, comprising: receiving source code including source code statements; processing the source code statements in the computer readable storage medium 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, wherein any statements forming an inner loop are included in the group including statements comprising an outer loop when a variable from the inner loop is passed to the outer loop; inserting at least one directive in the source code, wherein each directive is associated with one group of statements; for each group of statements, identifying the directive in the source code and inserting the statements in the group associated with the identified directive inside the identified directive in the source code; generating resulting threaded code in the computer readable storage medium 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, wherein the resulting threaded code is processed to generate executable objects; determining a variable used by statements in different groups; and adding statements to the resulting threaded code to privatize the determined variable, wherein the privatized variable is defined by a producer thread and used by one or more consumer threads.