Use hash table to track registered tasks

Signed-off-by: Francis Giraldeau <francis.giraldeau@gmail.com>