i,
nice and easy to use but there seems to be a problem when you use several thread. I have a timeout for certain type of request the code is quite straightforward. I looks like the example, ie.
this.executor = Executors.newCachedThreadPool();
@Override
public void handle(Request request, Response response)
{
LOG.info("receiving request " + request.getAddress().toString());
Task task = new Task(request, response, cfg);
executor.execute(task);
LOG.info("Executing task");
}
There is two differences In the Task I have a Thread.sleep(millis). I tried the same sniper code outside the simpleframework and It worked fine. The problem is that it seems that when you have big loads of request where "Thread.sleep()" runned another not. The simpleframework get a deadlock handling like 3 requests at the time, ie. and it does not handle more request until all "Thread.sleep(..)" ar fineshed.
In my eyes it should continue to handle requests even if some threads are sleeping, the same sniper code outside simpleframework works fine so I don't think it has to do with the code...I quite sure thet even if you don't have Thread.sleep(..) the simpleframework handles a fixed number of threads.
I need some hints och help with this issue.