add flow support to on()
add flow support to on()

Summary: add support for flow to `on()` - requested by Songqiao

Reviewed By: ericniebler

Differential Revision: D14814588

fbshipit-source-id: 3989d0aa554a32482dcc15c1ba706d5604c95eb8

facebook/folly,facebook/folly,facebook/folly,facebook/folly,facebook/folly