Example #1
0
 public IOThread(int slotId)
     : base(slotId)
 {
     m_completionPort = CompletionPort.Create();
     Mailbox = new IOThreadMailbox(m_completionPort);
     m_completionStatuses = new CompletionStatus[100];
 }
Example #2
0
        /// <summary>
        /// Create a new IOThread object within the given context (Ctx) and thread.
        /// </summary>
        /// <param name="ctx">the Ctx (context) for this thread to live within</param>
        /// <param name="threadId">the integer thread-id for this new IOThread</param>
        public IOThread([NotNull] Ctx ctx, int threadId)
            : base(ctx, threadId)
        {
            var name = "iothread-" + threadId;
            m_proactor = new Proactor(name);
            m_mailbox = new IOThreadMailbox(name, m_proactor, this);

#if DEBUG
            m_name = name;
#endif
        }