Centralize task resource management in Task.