I'm building a python add-in for ArcGIS desktop with a button which runs a while loop. Another button should close the while loop. In the while loop there is a continuous process going on which is important for the functionality of the add-in. But unfortunately the while loop causes the add-in, and therefore ArcGIS desktop, to hang.
I have tried time.sleep(.1) in the while loop. And I have tried the threading library. But nothing seems to work.
I was hoping someone maybe had a suggestion? Thanks in advance!