gregoriusxu / booksleeve

Automatically exported from code.google.com/p/booksleeve
Other
0 stars 0 forks source link

In certain cases tasks never become completed #54

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
        void SetInnerReplies(RedisResult result)
        {
            if (queued != null)
            {
                for (int i = 0; i < queued.Length; i++)
                {
                    var reply = result; // need to be willing for this to be mutated
                    RedisConnectionBase.CallbackMode callbackMode;
                    var ctx = parent.ProcessReply(ref reply, queued[i].InnerMessage, out callbackMode); <----- it throws exception here and  completion.SafeSetException(result.Error()) after the call to SetInnerReplies never get called.

You can reproduce this sitiation using this code:

using (var conn = new RedisConnection("192.168.180.1", allowAdmin: true))
{
    await conn.Open();
    try
    {
        var t = conn.CreateTransaction();
        var flushTask = t.Strings.Set(1, "1", "1");
        var setTask = t.Strings.Set(1, new Dictionary<string, string>());
        await t.Execute();
        await flushTask;
        await setTask;
    }
    catch
    {
        Console.WriteLine ("Will never be here");
    }
    Console.WriteLine ("Will never be here");
}

Original issue reported on code.google.com by kek...@gmail.com on 30 Jan 2014 at 1:59

GoogleCodeExporter commented 8 years ago

Original comment by marc.gravell on 30 Jan 2014 at 2:23

GoogleCodeExporter commented 8 years ago
Any chance of moving this project to GitLab? It would be much easier to provide 
patches via pull requests.

Original comment by kek...@gmail.com on 31 Jan 2014 at 12:02