What triggers this? How do you plug it into your event loop?