maidsafe/MaidSafe-RUDP — pull request #14 by ned14 (2014-08-28 18:01:03+00:00)
Title: Maid 22 bad alloc

Ok, this is a fairly breaking change to how RUDP works in that ASIO worker threads decreases to 1, and therefore all concurrency within RUDP ceases, and therefore the cause of this bug where Socket was being destroyed concurrently to its use in other threads goes away. The other change is I ripped out my previous remedial work in making Multiplexer reference count deleted, because it was obviously obscuring the problem rather than fixing it.

I soak tested this last night and it hanged exactly once which may or may not be important - out of 500 iterations, that's a hang rate of 0.2%, and could be a false positive. The removal of the remedial work has introduced lots of ThreadSanitiser fails, this is a good thing and I'll try to figure out the new cause. Various tests still sporadically fail, but this branch doesn't have my increased timeouts, so that is expected.

So, if you start seeing hangs after applying this patch, get back to me :) Otherwise it probably fixes more problems than it causes, and therefore is an improvement.