Add task interface.

Signed-off-by: cyberzhg <cyberzhg@gmail.com>