You might not need parallel execution for this at all. Many actions in games that seem to play out simultaneously are in fact being stepped sequentially. It's just that we only see the updated state once they've all been advanced, so it appears they're progressing in parallel.
As long as we arrive at the new state in time to present a new rendered frame to the player 30, 60, or more times each second, then the exact order in which the events were processed doesn't matter (or at least shouldn't matter, if we've planned our dependencies right and avoided creating order-of-update bugs for ourselves)
This is called the Game Loop Pattern - Robert Nystrom's book on such patterns does a great job explaining and motivating this pattern, so I highly recommend giving it a read.
In your case, your logic might look like this:
int Main() {
while(exit == false) {
Update_Game_State();
Render_Frame();
sleep(50);
}
return 0;
}
Where your update function works through each system that needs to be advanced and ticks it forward one step:
void Update_Game_State() {
playerFood += 10;
troopsTrained += 1;
Process_Attacks();
// etc.
}
If you want your harvesting/training/attack events to run at different frequencies, then you can maintain a list of ongoing events and the next timestamp when they need to occur. Your update loop can then walk the list, updating the events whose time has come and skipping anything that's still pending for the future.
There are more sophisticated game loops possible too. Glenn Fielder's "Fix Your Timestep" article outlines some popular best practices.
If you prefer to write code in a different style, where each system looks like it's running uninterrupted in parallel, but without the complications of thread synchronization, you can look into Coroutines. These are methods that can suspend their execution state midway through to let other code take a turn, then resume where they left off. I wrote about using threads vs coroutines in the context of Unity here, and similar principles will apply in other environments.