Lock Screen vs Login Window - affect on running processes
I just tested this in my Macbook Air, you can use Shift-Control-Power to lock your screen and it kept the processes running.

If you want to enter lockscreen after this command, you have to setup this option:

and your Energy Saver Settings should look like this: