Exemple #1
0
                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()));
                }
Exemple #2
0
                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);
                }