Difference between is_blocked() & is_grabbed()

Hi…it seems is_blocked() & is_grabbed() gives same information that whether some other sequence is currently running grab/lock or not. So why we are using these 2 calls in the example code ?

In reply to shekher201778:

There is a difference between the two functions, except in this example it won’t show up in the output. The function
is_grabbed()
gives the locked/grabbed state of the sequencer. The function
is_blocked()
gives you the locked/grabbed state of the sequence. If you are the sequence that locked/grabbed the sequencer, then is_grabbed() returns true and is_blocked() returns false.