No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


An ExecutorService supporting multiple writing and a single reading thread. The service uses a specialized queue in which the writing threads needs only a read from a thread local field and a write to a volatile field to publish an event to the queue. Writing does not need "compare and swap" operations like the standard JDK concurrent queues, leading to an easier and potentially faster algorithm. A usage example is a background thread writing log events asynchronously to a file.




Creating and starting the event bus:

 eventBus = VMLensExecutors.createEventBus();
		 consumer = eventBus.newConsumer(); 
		 eventBus.start( new EventSink()
					public void execute(Object event) {
						// TODO Auto-generated method stub
					public void close() {
						// TODO Auto-generated method stub
					public void onWait() {
						// TODO Auto-generated method stub
				 }, new ThreadFactory()
					public Thread newThread(Runnable r) {
						return new Thread(r);

Writing to the event bus:

	consumer.accept(  "event" );


executor-service is released under the Apache License 2.0

Blog Entries about executor-service