def task_ready(request, remove_request=requests.pop, discard_active_request=active_requests.discard, discard_reserved_request=reserved_requests.discard):
 remove_request(request.id, None)
 discard_active_request(request)
 discard_reserved_request(request)

def task_ready ( request , remove_request = requests . pop , discard_active_request = active_requests . discard , discard_reserved_request = reserved_requests . discard ) : remove_request ( request . id , None ) discard_active_request ( request ) discard_reserved_request ( request )
updates global state when a task is ready .