Not as such at the moment.
Individual tasks can be stopped, if you created a task like this.
task mytask( mycallback );
That task can be stopped by using
mytask.stop();
but there are other ways as well, it can be stopped by using the name of the callback.
task::stop( mycallback );
or the task instance
task::stop( mytask );
tasks behave much as ROBOTC tasks did, students have all sort of bad usage patterns, treating them like functions etc. so, for example, constantly creating a task in a loop will simply keep starting that same task from the beginning.
So what’s the problem with a stop all method ?
The issue is that events are also tasks, when you create an event such as
Controller1.ButtonA.pressed( mybuttoncallback );
the function triggered by the event is running as a task, knowing what to do when a “stop all” method was called is a bit ambiguous, so we leave it to the user code to track tasks and events and decide the best course of action.
There is, however, one situation we can handle in a competition environment. The competition class has a flag that can be set called bStopAllTasksBetweenModes. setting this to true will cause the competition control to reset everything to the situation the code was in when main was called when the robot is disabled, it will kill any tasks and event created after that point, tasks that are created as part of global constructors (which run before main is entered) will remain, it’s intended as pretty advanced control so you need to really understand what the implications of using that are.