Table of Contents

About

This page is about th event loop in Vertx.

Vert.x calls handlers by using a thread known as an event loop.

Implementation

The event loop is created with a Vertx object.

  • Every event loop is attached to a thread.
  • By default Vert.x attaches 2 event loops per CPU core thread.
  • Same thread processing: The direct consequence of 2 event loops per CPU is that a regular verticle always processes events on the same thread, so there is no need to use thread coordination mechanisms to manipulate a verticle state (e.g, Java class fields).