using ioloop callback instead of threads
to avoid inconsistencies in fork behavior