public void renderQueueStats(final JsonWriter jsonWriter)throws IOException {
EventLoop eventLoop = getHost().getEventLoop();
final AtomicReference<IOException> exceptionRef = new AtomicReference<IOException>();
if (Thread.currentThread() != eventLoop.getEventThread()) {
final Semaphore semaphore = new Semaphore(0);
eventLoop.queueAsyncCallback(new Callback() {
@Override
public void execute() {
try {
renderQueueStatsInternal(jsonWriter);