Add a decorator for exclusive device access
Swap resizing support