Exemple #1
0
        public Event EnqueueMigrateMemObjects(MemObject[] memObjects, MigrationFlags flags, params Event[] eventWaitList)
        {
            MemObjectSafeHandle[] memHandles = null;
            if (memObjects != null)
            {
                memHandles = Array.ConvertAll(memObjects, mem => mem.BaseHandle);
            }

            EventSafeHandle[] eventHandles = null;
            if (eventWaitList != null)
            {
                eventHandles = Array.ConvertAll(eventWaitList, @event => @event.Handle);
            }

            EventSafeHandle handle = UnsafeNativeMethods.EnqueueMigrateMemObjects(Handle, memHandles, flags, eventHandles);

            return(new Event(handle));
        }