-
Notifications
You must be signed in to change notification settings - Fork 80
Open
Description
I have a file which contains functions to start/stop the global scheduler, and to return a forward-declared pointer to it.
It turns out that I can't avoid the include in this case, because my scheduler start function takes an ftl::EmptyQueueBehaviour
enum to pass on to the scheduler. I can forward declare the enum itself but can't provide a default value without the include.
These types don't rely on anything in task_scheduler.h
(other than the latter depending on the former):
enum class EmptyQueueBehavior
struct TaskSchedulerInitOptions
There is some precedent for small headers, see task.h:
#pragma once
namespace ftl {
class TaskScheduler;
using TaskFunction = void (*)(TaskScheduler *taskScheduler, void *arg);
struct Task {
TaskFunction Function;
void *ArgData;
};
} // End of namespace ftl
Is it worth an ftl_types.h
or similar? Thoughts?
Metadata
Metadata
Assignees
Labels
No labels