Lines Matching refs:Item
34 // - Items need to inherit from ItemParallelJob::Item.
37 // Items need to be marked as finished after processing them. Task and Item
46 class V8_EXPORT_PRIVATE Item {
48 Item() = default;
49 virtual ~Item() = default;
51 // Marks an item as being finished.
68 DISALLOW_COPY_AND_ASSIGN(Item);
79 // Retrieves a new item that needs to be processed. Returns |nullptr| if
80 // all items are processed. Upon returning an item, the task is required
81 // to process the item and mark the item as finished after doing so.
89 Item* item = (*items_)[cur_index_++];
90 if (item->TryMarkingAsProcessing()) {
91 return static_cast<ItemType*>(item);
99 friend class Item;
108 base::Semaphore* on_finish, std::vector<Item*>* items,
115 std::vector<Item*>* items_ = nullptr;
132 // Adds an item to the job. Transfers ownership to the job.
133 void AddItem(Item* item) { items_.push_back(item); }
143 std::vector<Item*> items_;