public int getActiveThreads() {
        return counter.get();
    }
Thread Barrier used to avoid concurrency issues during event processing
modules/siddhi-core/src/main/java/io/siddhi/core/util/ThreadBarrier.java