We use that structure when someone has an opportunity or convenience to do something while dealing with something else at the same time. I guess you'll think it might be confusing. You'd better understand how and when to use it when experiencing the situation like one of these.
Hazır dışarı çıkmışken gazete de al. - You're gonna go outside and you should buy newspaper.
(Because noone except for you is gonna go outside today or we're too lazy to do that either it's pretty tiring.)
Footnote: It's especially used for something burdensome in some measure or not often practiced. So it's circumstantial usage.