But sometimes, if your CD or DVD is damaged and Linux is unable to read it but it doesn't seem to stop soon on most occasions, until the OS "decides" it is unreadable (only it knows when >:( ), you'll have to wait!.
But fear not my friends :), there is a way that you can "forcefully" unmount any mounted volumes in Linux using the Terminal.
Now, I assume that your default mount point for the CD/DVD drive is "sr0", but as said before, not only CD/DVD drives but you can unmount any drive (including HDD partitions) with this command, just replace the "sr0" with your device mount point.
So, open your terminal and issue the below command...
sudo umount -f /dev/sr0
Now, you'll be able to eject the disk using the button or just enter the below command in your already opened terminal...
That's it :).