I'd prefer not to synchronize on poller - that risks interfering with synchronization that the poller itself does internally, so adds tighter coupling. But saying that, we're calling "alien code" of poller.start() / poller.stop() while holding the lock which isn't ideal. But tricky to do better without either doing annoying threading stuff here, or demanding that the caller does annoying threading stuff.

It's (mostly?) safe just now, because poller doesn't do any synchronization itself - but it does call through to submit tasks.