1. A system to manage blocking of code executions in an on-demand code execution system due to asynchronous operations, wherein the on-demand code execution system comprises a plurality of execution environments on which user-submitted code may execute, the system comprising: a non-transitory data store configured to store state information regarding suspended executions of tasks on the on-demand code execution system, wherein individual tasks are associated with code executable to implement functionality corresponding to the individual tasks; and one or more processors configured with computer-executable instructions to: obtain instructions to execute a first task associated with first executable code; begin execution of the first executable code within a first execution environment, wherein execution of the first executable code calls for execution of a first dependency operation; after detecting that execution of the first executable code has become blocked awaiting completion of the first dependency operation: determine that a predicted duration of blocking for the execution of the first executable code satisfied a threshold value; generate state information for the execution of the first executable code; store the generated state information in the non-transitory data store; and remove the execution of the first executable code from the first execution environment; and after detecting that the first dependency operation has completed: select a second execution environment in which to resume execution of the first executable code; and utilize the generated state information, as stored in the non-transitory data store, to resume execution of the first executable code in the second execution environment.