主权项 |
1. A method for prioritizing code execution without maintaining reference counts and without switching contexts, comprising:
accessing a thread on a processor, wherein the thread is in a context containing a set of code instances; identifying sections of the set of code instances that correspond to deferrable code tasks, wherein identifying sections of the set of code instances comprises:
receiving an input code instance;identifying a code task within the input code instance;receiving a determination that the identified code task is deferrable, wherein receiving the determination that the identified code task is deferrable includes utilizing one or more characterization factors, wherein the one or more characterization factors are selected from a group consisting of: informational data logging, housekeeping, local variable clean-up, local variable freeing, memory de-allocation, non-local data affected, and whether a return function is affected; anddecorating the code task as deferrable; executing the thread in the context; determining that the thread is idle; and executing, in the context, at least one of the deferrable code tasks, wherein the deferrable code task is executed within the context and in response to determining that the thread is idle. |