works only with service.threads=1