1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 16:55:09 +00:00

Kernel: Use plain Function objects for the WorkQueue

The WorkQueue class previously had its own inline storage functionality
for function pointers. With the recent changes to the Function class
this is no longer necessary.
This commit is contained in:
Gunnar Beutner 2021-05-19 14:42:16 +02:00 committed by Andreas Kling
parent 661d1aa8d1
commit e9898a6031
2 changed files with 8 additions and 25 deletions

View file

@ -31,9 +31,7 @@ WorkQueue::WorkQueue(const char* name)
have_more = !m_items.is_empty();
}
if (item) {
item->function(item->data);
if (item->free_data)
item->free_data(item->data);
item->function();
delete item;
if (have_more)