Closed GoogleCodeExporter closed 9 years ago
I don't suppose there is anyway to write a script to replicate this bug is
there?
In order to ensure this bug stays fixed it would be nice to have a test case
that exhibits these bugs.
Original comment by demis.be...@gmail.com
on 3 Sep 2010 at 6:13
[deleted comment]
you can run this with a redis server on local default port.
multiple connections with the pool, wait 10 secs, then shutdown !
thanks
using System;
using ServiceStack.Redis;
using System.Threading;
namespace Test
{
class Program
{
public static void Stuff() {
while(true) {
try {
using(RedisClient rc = (RedisClient)pool.GetClient()) {
rc.Set<DateTime>("test",DateTime.Now);
}
}
catch (Exception e) {
Console.WriteLine(e.Message);
}
Thread.Sleep(10);
}
}
public static PooledRedisClientManager pool;
public static void Main(string[] args)
{
pool = new PooledRedisClientManager();
try {
Thread[] ths = new Thread[100];
for(int i=0;i<ths.Length;i++) {
ths[i]=new Thread(new ThreadStart(Stuff));
ths[i].Start();
}
Console.WriteLine("running, waiting 10secs..");
Thread.Sleep(10000);
using(RedisClient rc = (RedisClient)pool.GetClient()) {
Console.WriteLine("shutdown redis !");
rc.Shutdown();
}
}
catch (Exception e) {
Console.WriteLine(e.Message);
}
}
}
}
Original comment by jeanmari...@gmail.com
on 4 Sep 2010 at 10:35
Hi Thanks for this, I've got new builds attached that hopefully resolves this
issue.
Let me know how it goes.
Cheers,
D
Original comment by demis.be...@gmail.com
on 5 Sep 2010 at 12:40
Attachments:
Fixed ! thanks a lot !
Original comment by jeanmari...@gmail.com
on 8 Sep 2010 at 11:37
Sweet good to know, closing.
Original comment by demis.be...@gmail.com
on 8 Sep 2010 at 11:40
Original issue reported on code.google.com by
jeanmari...@gmail.com
on 3 Sep 2010 at 4:53