コード例 #1
0
        //-----------------------------------------------------------------------------------------------

        //initialises one thread on the manager
        private void SetThreadOnManager(GThread thread)
        {
            thread.SetId(++_LastThreadId);
            thread.SetApplication(this);

            Manager.Owner_SetThread(
                Credentials,
                new ThreadIdentifier(_Id, thread.Id, thread.Priority),
                Utils.SerializeToByteArray(thread));
        }
コード例 #2
0
        /// <summary>
        /// Starts the given thread indirectly by adding it to the thread buffer. When the thread buffer count reaches the thread buffer capacity then that thread buffer is sent to the manager as one thread.
        /// </summary>
        /// <param name="thread">thread</param>
        public override void StartThread(GThread thread)
        {
            lock (this)
            {
                // assign an internal thread id...
                thread.SetId(_InternalThreadId++);

                // add thread to thread buffer...
                _ThreadBuffer.Add(thread);
            }
        }
コード例 #3
0
        /// <summary>
        /// Starts the given thread indirectly by adding it to the thread buffer. When the thread buffer count reaches the thread buffer capacity then that thread buffer is sent to the manager as one thread.
        /// </summary>
        /// <param name="oThread">thread</param>
        public override void StartThread(GThread oThread)
        {
            lock (this)
            {
                // assign an internal thread id...
                oThread.SetId(m_nInternalThreadId++);

                // add thread to thread buffer...
                m_oThreadBuffer.Add(oThread);
            }
        }
コード例 #4
0
ファイル: GApplication.cs プロジェクト: JamesTryand/alchemi
        //-----------------------------------------------------------------------------------------------
        //initialises one thread on the manager
        private void SetThreadOnManager(GThread thread)
        {
            thread.SetId(++_LastThreadId);
            thread.SetApplication(this);

            Manager.Owner_SetThread(
                Credentials,
                new ThreadIdentifier(_Id, thread.Id, thread.Priority),
                Utils.SerializeToByteArray(thread));
        }