I fail to see what value this really adds:
If you have a laptop, just close the lid. By default (on a Mac) you have to log in again when you return.
If you have a desktop, what kind of environment are you going to be in where you need to guarantee the screen locks when you are away even momentarily?