Task queue implementation