TaskQueue implementation