Skip to content

Instantly share code, notes, and snippets.

View lw346's full-sized avatar

Luke Wood lw346

  • London, UK
View GitHub Profile

Keybase proof

I hereby claim:

  • I am lw346 on github.
  • I am lukew (https://keybase.io/lukew) on keybase.
  • I have a public key whose fingerprint is C26A DA46 B81F AD69 A410 8CBB 2AED A7A9 48EE 6ADF

To claim this, I am signing this object:

@lw346
lw346 / HystrixTest.java
Last active June 28, 2017 08:57
Hystrix not able to propagate error
public class HystrixTest {
// Hystrix commands have default command timeout execution of 1 second
private HystrixObservableCommand<String> testCommand = new HystrixObservableCommand<String>(HystrixCommandGroupKey.Factory.asKey("test")) {
@Override
protected Observable<String> construct() {
// This Promise will never complete
return RxRatpack.observe(Promise.async(up -> {}));
}
};
@lw346
lw346 / gist:a93359b938344e205f5f
Created October 8, 2014 16:39
Netty #2958 concurrency issue
boolean oldAutoRead = this.autoRead; // I've called this GET=
this.autoRead = autoRead; // I've called this PUT=
if (autoRead && !oldAutoRead) {
channel.read();
} else if (!autoRead && oldAutoRead) {
autoReadCleared();
}
Thread 1 calls setAutoRead(false);
@lw346
lw346 / NonRunnable.java
Last active December 30, 2015 07:19
Frames bug report
/**
* This fails with the following stack trace:
Exception in thread "main" com.tinkerpop.frames.modules.javahandler.JavaHandlerException: Problem locating handler class for interface NonRunnable$Animal
at com.tinkerpop.frames.modules.javahandler.JavaHandlerModule.createHandler(JavaHandlerModule.java:158)
at com.tinkerpop.frames.modules.javahandler.JavaMethodHandler.processElement(JavaMethodHandler.java:31)
at com.tinkerpop.frames.modules.javahandler.JavaMethodHandler.processElement(JavaMethodHandler.java:10)
at com.tinkerpop.frames.FramedElement.invoke(FramedElement.java:83)
at $Proxy5.speak(Unknown Source)
at NonRunnable.main(NonRunnable.java:48)
@lw346
lw346 / gist:5263871
Created March 28, 2013 15:06
Component model
: :
| Application Handlers |
+------------------------------------+
|| -----------------------------------------------
\/ / Protocol support bundled into Netty include:
+------------------------------------+ - HTTP & WebSocket
| Protocol Support N | - Zlib compression
+------------------------------------+ - Google protocol Buffers
: :\
+------------------------------------+