/// <summary>
        /// Starts the specified processor on a dedicated thread, and returns the
        /// <see cref="Thread"/> object.
        /// </summary>
        /// <param name="processor"></param>
        /// <returns></returns>
        private static Thread StartProcessorThread(QueueProcessor processor)
        {
            var thread = new Thread(
                delegate()
            {
                try
                {
                    processor.Run();
                }
                catch (Exception e)
                {
                    Platform.Log(LogLevel.Error, e);
                }
            });

            thread.Start();
            return(thread);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Starts the specified processor on a dedicated thread, and returns the
        /// <see cref="Thread"/> object.
        /// </summary>
        /// <param name="processor"></param>
        /// <returns></returns>
        private static Thread StartProcessorThread(QueueProcessor processor)
        {
            var thread = new Thread(
                delegate()
            {
                try
                {
                    processor.Run();
                }
                catch (Exception e)
                {
                    Platform.Log(LogLevel.Error, e);
                }
            });

            if (!String.IsNullOrEmpty(processor.Name))
            {
                thread.Name = processor.Name;
            }

            thread.Start();
            return(thread);
        }
Exemplo n.º 3
0
		/// <summary>
		/// Starts the specified processor on a dedicated thread, and returns the
		/// <see cref="Thread"/> object.
		/// </summary>
		/// <param name="processor"></param>
		/// <returns></returns>
		private static Thread StartProcessorThread(QueueProcessor processor)
		{
			var thread = new Thread(
				delegate()
				{
					try
					{
						processor.Run();
					}
					catch (Exception e)
					{
						Platform.Log(LogLevel.Error, e);
					}
				});

			thread.Start();
			return thread;
		}
Exemplo n.º 4
0
		/// <summary>
		/// Starts the specified processor on a dedicated thread, and returns the
		/// <see cref="Thread"/> object.
		/// </summary>
		/// <param name="processor"></param>
		/// <returns></returns>
		private static Thread StartProcessorThread(QueueProcessor processor)
		{
			var thread = new Thread(
				delegate()
				{
					try
					{
						processor.Run();
					}
					catch (Exception e)
					{
						Platform.Log(LogLevel.Error, e);
					}
				});

			if (!String.IsNullOrEmpty(processor.Name))
				thread.Name = processor.Name;

			thread.Start();
			return thread;
		}