Likewise, you should use duppy's API here instead of using a dedicated thread. Only thing would be to make sure that there is at least one thread that will treat your task in duppy..