Exemplo n.º 1
0
        internal Loop(IntPtr handle, ByteBufferAllocatorBase allocator)
        {
            NativeHandle        = handle;
            ByteBufferAllocator = allocator;

            callback = new AsyncCallback(this);
            async    = new Async(this);

            // this fixes a strange bug, where you can't send async
            // stuff from other threads
            Sync(() => { });
            async.Send();
            RunOnce();

            // ignore our allocated resources
            async.Unref();
            callback.Unref();
        }
Exemplo n.º 2
0
        internal Loop(IntPtr handle, ByteBufferAllocatorBase allocator)
        {
            NativeHandle = handle;
            ByteBufferAllocator = allocator;

            callback = new AsyncCallback(this);
            async = new Async(this);

            // this fixes a strange bug, where you can't send async
            // stuff from other threads
            Sync(() => { });
            async.Send();
            RunOnce();

            // ignore our allocated resources
            async.Unref();
            callback.Unref();
        }
Exemplo n.º 3
0
 public Loop(ByteBufferAllocatorBase allocator)
     : this(CreateLoop(), allocator)
 {
 }
Exemplo n.º 4
0
 public Loop(ByteBufferAllocatorBase allocator)
     : this(uv_loop_new(), allocator)
 {
 }
Exemplo n.º 5
0
		public Loop(ByteBufferAllocatorBase allocator)
			: this(CreateLoop(), allocator)
		{
		}