I'm working on a bot framework that would allow a thread to read out certain
states (health, combat,money, etc) I call this the director_thread.
Based on that state, decide if tasks need to be added to the 'job queue'.
The jobqueue_thread is a different thread that works through a linked list (jobqueue),
each node being a job that is pending. The director_thread is allowed to
add jobs anywhere into the jobqueue, remove jobs, etc. The jobqueue_thread is desinged
to launch jobs when the previous one is done, or override the current one if the
director_thread tells to do so.
Can I put a pointer to a function as a field in a struct and cause it to be
executed when the jobqueue_thread reaches that node ?