Cool work! I have stress tested the library a bit and encountered an ArgumentException several times due to the CopyTo function complaining about insufficient length.
I fixed the race condition, which is due to lists being allocated with a count outside the lock. If a new message/error/etc. is received before the code enters the lock, the list will no longer be big enough to hold the new message/error/etc.
Cool work! I have stress tested the library a bit and encountered an ArgumentException several times due to the CopyTo function complaining about insufficient length.
I fixed the race condition, which is due to lists being allocated with a count outside the lock. If a new message/error/etc. is received before the code enters the lock, the list will no longer be big enough to hold the new message/error/etc.