Skip to content

Instantly share code, notes, and snippets.

Thread Pools

Thread pools on the JVM should usually be divided into the following three categories:

  1. CPU-bound
  2. Blocking IO
  3. Non-blocking IO polling

Each of these categories has a different optimal configuration and usage pattern.

@robinhowlett
robinhowlett / echoHttpRequest.js
Last active August 29, 2015 14:08 — forked from Marak/echoHttpRequest.js
Echo HTTP requests
module['exports'] = function echoHttp (hook) {
hook.debug("Debug messages are sent to the debug console");
hook.debug(hook.params);
hook.debug(hook.req.path);
hook.debug(hook.req.method);
package com.silverchalice.cors;
import java.io.IOException;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
@robinhowlett
robinhowlett / Backbone-HAL.js.coffee
Created June 29, 2012 22:46 — forked from mikekelly/Backbone-HAL.js.coffee
Two small components for making Backbone play nicely with application/hal+json
window.HAL = {}
class HAL.Model extends Backbone.Model
constructor: (attrs) ->
super @parse(_.clone attrs)
parse: (attrs = {}) ->
@links = attrs._links || {}
delete attrs._links
@embedded = attrs._embedded || {}