Closed laforge49 closed 10 years ago
Ouch! RequestImpl.close already cancels all in-process requests, which would include all persistent requests, so PersistentRequest should not be needed.
Ouch again! RequestImpl.close should close all in-process requests, not cancel them.
There is a bug of sorts in the dining philosophers program in the tutorial. If the DiningTable's reactor is closed, any Philosopher with a persisted eat request will hang. The fix is to make the eat request a PersistentRequest which is a Closeable AsyncRequest.
When a reactor closes, it closes all of its closeables. If all persisted requests are closeable, then they will be closed, and that returns a ReactorClosedException to the request context, which in the above case will be the Philosophers.