ohhh i was wrong basically wht i read was just a small example of spin lock . the exact definition is here .
a spinlock is a lock which causes a thread trying to acquire it to simply wait in a loop ("spin") while repeatedly checking if the lock is available. Since the thread remains active but is not performing a useful task, the use of such a lock is a kind of busy waiting..
so its kind of busy waiting