Esempio n. 1
0
        public async void Start()
        {
            DBTaskQueue self = this.Get();

            while (true)
            {
                if (self.Id == 0)
                {
                    return;
                }

                DBTask task = await self.Get();

                try
                {
                    await task.Run();

                    task.Dispose();
                }
                catch (Exception e)
                {
                    Log.Error(e.ToString());
                }
            }
        }
Esempio n. 2
0
        public override async void Start(DBTaskQueue self)
        {
            while (true)
            {
                if (self.IsDisposed)
                {
                    return;
                }

                DBTask task = await self.Get();

                try
                {
                    await task.Run();

                    task.Dispose();
                }
                catch (Exception e)
                {
                    Log.Error(e.ToString());
                }
            }
        }