Main | Playing with toys »

Jetty 'Continuations'

Here's a weird hack called "Continuations" to get a Java Servlet request handler to suspend until there's something to do. It's worth pointing out that invoking the 'continuation' doesn't actually 'continue,' it just re-tries.

This seems workable for the specific case of suspending an event-polling request. Note that it's only working around the threading limitations of Java, anyway. Also note the issue about side effects discussed in the comments.

Post a comment