Main > Knowledge Base > Developer resources > Development recommendations > 1C:Enterprise script > User interruption of module execution > Developer resources > Development recommendations > 1C:Enterprise script > User interruption of module execution > Developer resources > Development recommendations > 1C:Enterprise script > User interruption of module execution

User interruption of module execution

Users can interrupt module execution by pressing Ctrl+Break only when the module calls the global context method UserInterruptProcessing(). This procedure checks whether the user pressed Ctrl+Break and if they did, it interrupts module execution.

Calling this procedure makes sense in loops if their execution might take significant time.

The interruption is performed unconditionally, without a confirmation request. This allows using the procedure in time-consuming transactions.

Module interruption cannot be used in some handlers. It can only be used in handlers of actions that users explicitly perform in forms or in the global command interface. For example, you can use interruption in a command handler, but you cannot use it in the OnOpen() form handler.

Note that the interruption is only performed when the UserInterruptProcessing() is called. Execution of time-consuming operations that are called from modules, such as queries, cannot be interrupted.

Next page: Using temporary files in configurations




© 1C LLC. All rights reserved
1C Company respects the privacy of our customers and visitors
to our Web-site.