Resigning Job on H1B

Hi Anil,

I am currently working on H1B visa and unable to continue on current job.

My wife is also on H1B and I can apply for H4 EAD.

I want to be able to resign on current job. Can I apply for H4 and simultaneously resign from current job? Do I need to wait for receipt?

Also, while waiting for H4 can I apply for jobs with H1B and revoke H4 application if I find one?

Thank you.