maltes
committed
on 15 Nov 06
Added deadlock protection (or so I hope)