# Special Topics: Tasks

Most Lens commands run atomically and don't give up control until they return. However, some commands take a long time to complete and they will periodically give up control to refresh the displays and allow the user to execute other commands. These are called tasks. They include training (normal and parallel), testing, loading and saving example files, building the link viewer, and executing the wait command.

If the Main Window is open when a task begins, you will see the "Exit" button at the bottom of the window change to "Stop <the task>". If you press the button or cause an interrupt signal with Ctrl-C, the task will be aborted when it is safe to do so.

If you start a second task while one is already running, the first task will wait until the second one finishes. Therefore, you could have an entire stack of tasks. Only the top one will actually be executing and the others will be waiting for the ones above them to complete. An interrupt will only affect the top task on the stack.

It would be unsafe to execute some commands while certain tasks are running. For example, you would not want to delete the network in the middle of training. Therefore, each command will check whether it is safe to run before doing so and return with an error if it would be unsafe. Ideally, this should prevent you from causing a segmentation fault.

Incidentally, you cannot load examples from more than one set at a time.

Last modified: Sat Nov 11 13:57:36 EST 2000