One async call leads to another, and another, all the way up the call stack...

This commit is contained in:
LukePulverenti Luke Pulverenti luke pulverenti
2012-08-19 16:38:31 -04:00
parent 64887fa743
commit 937d27ae9d
38 changed files with 393 additions and 373 deletions

View File

@@ -1,4 +1,5 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using MediaBrowser.Common.Net.Handlers;
using MediaBrowser.Controller;
using MediaBrowser.Model.Entities;
@@ -7,9 +8,12 @@ namespace MediaBrowser.Api.HttpHandlers
{
class UsersHandler : BaseJsonHandler<IEnumerable<User>>
{
protected override IEnumerable<User> GetObjectToSerialize()
protected override Task<IEnumerable<User>> GetObjectToSerialize()
{
return Kernel.Instance.Users;
return Task.Run(() =>
{
return Kernel.Instance.Users;
});
}
}
}