function rebindCallback(target, source, postSetCallback) {
  var i = 2, n = arguments.length, method;
  while (++i < n) target[method = arguments[i]] = doRebind(target, source, source[method], postSetCallback);
  return target;
}
http://www.embedded.com/electronics-blogs/embedded-round-table/4419407/The-ring-buffer