in reply to Re^2: Execute function before exit of do() blockin thread Execute function before exit of do() block
Your solution would not work in my case.