You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
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):There is some precedent for small headers, see task.h:
Is it worth an
ftl_types.h
or similar? Thoughts?The text was updated successfully, but these errors were encountered: