How to stop the mesher. Sometimes it takes too long

How can I stop meshing process(for example: BRepMesh_IncrementalMesh call)  in OpenCascade?

joe's picture

I mean any parameter setting can be used to stop the meshing function call in a neat way (no crash)?