1. A method for executing code with a variable number of hardware threads, comprising: executing, utilizing at least one processing unit, at least a first portion of code of a program using at least one hardware thread, the code stored in at least one tangible machine readable media, the code including at least one instruction that specifies execution of at least one additional portion of the code using at least one additional hardware thread; setting a processor state indicator indicating the operational mode of the at least one processing unit to a first state when at least one additional hardware thread is available; evaluating the processor state indicator to determine whether to execute the at least one additional portion of the code using the at least one additional hardware thread; if the processor state indicator is set to the first state, executing, utilizing the at least one processing unit, the at least one additional portion of the code using the at least one additional hardware thread; if the processor state indicator is set to a second state, executing, utilizing the at least one processing unit, the at least one additional portion of the code, as a subroutine using the at least one hardware thread and setting the processor state indicator to one of the first state or the second state, based on a request from the at least one processing unit for which the code is executed, by: setting the processor state indicator to the second state when the at least one processing unit does not support executing the at least one additional portion of the code using the at least one additional hardware thread.