core: add option to not lock for Machine#action [GH-4574]