---
title: "SyncHandler..::.Abort Method "
canonical: https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_SyncHandler_Abort.htm
product: "Graphics Mill 5.5 for .NET"
---

This documentation is for the old version. [Go to the latest Graphics Mill docs](https://www.graphicsmill.com/docs/gm/)

# SyncHandler.Abort Method 
 
Aborts current operation.
 
**Namespace:** [Aurigma.GraphicsMill](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill.htm.md)
 **Assembly:** Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
 
## Syntax
  
```
Public Overridable Sub Abort
```
 
```csharp
public virtual void Abort()
```
 
### Implements
 
[ISyncHandler.Abort()](https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_ISyncHandler_Abort.htm.md)
 
## Remarks
  
The class which was aborted with this operation will throw the [AbortedException](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_AbortedException.htm.md). In synchronous mode you need to use standard exception handling mechanism (try/catch block or its analogue). In asynchronous mode the exception is retrieved into [Stopped](https://www.graphicsmill.com/docs/gm5/E_Aurigma_GraphicsMill_SyncHandler_Stopped.htm.md) event (as its argument). Event [Aborted](https://www.graphicsmill.com/docs/gm5/E_Aurigma_GraphicsMill_SyncHandler_Aborted.htm.md) is also fired.
 
If this method is called from main thread, it retuns a control only when auxilary thread has been stopped terminated. If it is called from the auxilary thread (i.e. from such event handlers like [Progress](https://www.graphicsmill.com/docs/gm5/E_Aurigma_GraphicsMill_SyncHandler_Progress.htm.md), [Paused](https://www.graphicsmill.com/docs/gm5/E_Aurigma_GraphicsMill_SyncHandler_Paused.htm.md), [Started](https://www.graphicsmill.com/docs/gm5/E_Aurigma_GraphicsMill_SyncHandler_Started.htm.md), etc), this method **does not wait** for thread terminating (to avoid deadlock).
 
If it is called after the execution was paused by [Pause()](https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_SyncHandler_Pause.htm.md) method, the operation will be stopped only after call of [Continue()](https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_SyncHandler_Continue.htm.md).
 
**Note** 
It makes no sense to call Abort() in event [Starting](https://www.graphicsmill.com/docs/gm5/E_Aurigma_GraphicsMill_SyncHandler_Starting.htm.md) because auxilary thread has not been launched yet at that point. It just will not have an effect.
   
## See Also

### Reference

- [SyncHandler Class](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_SyncHandler.htm.md)
- [Aurigma.GraphicsMill Namespace](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill.htm.md)
