Blocking option of Popup function only suspend the calling thread

In URScript API Reference, Popup function has a parameter to suspend the program but it seems to only suspend the calling thread. In this example, variable t1 stop while t2 still increase, so the program is not suspended.

def test():

 global t1 = 0
 global t2 = 0

 thread timer():
   while True:
     t1 = t1+1
     if t1 > 2000:
       popup(“popup”, “test”, False, False, True)
       t1 = 0
     end
     sync()
   end
 end

 run timer()

 while True:
   t2 = t2+1
   sync()
 end

end

If it is the desired behavior, I think documentation should be modify.

Hello,

This is the desired functionality, how you have defined the function above would be the equivalent of using a popup feature in a thread on polyscope, which would show the popup but not interrupt the main program:

image

Where as if the main had a popup the theard below will keep executing even though the main program has been ‘blocked’:

image

I agree the wording is a bit misleading. I’ll check in with our team and see what modifications can be made. Thank you for the heads up!

1 Like

thanks for the reply!