private static IodineObject Locked(VirtualMachine vm, IodineObject self, IodineObject[] args) { IodineLock spinlock = self as IodineLock; if (spinlock == null) { vm.RaiseException(new IodineTypeException(TypeDefinition.Name)); return(null); } return(IodineBool.Create(spinlock.IsLocked())); }
private static IodineObject Release(VirtualMachine vm, IodineObject self, IodineObject[] args) { IodineLock spinlock = self as IodineLock; if (spinlock == null) { vm.RaiseException(new IodineTypeException(TypeDefinition.Name)); return(null); } spinlock.Release(); return(null); }