On 03/20/2013 09:11 AM, Helen Williamson wrote:
> Has anyone had any success at using dispatch-reboot in tests and if so,
> have you done anything different?
Dispatch uses scalacheck to test itself. The trick is to shut it down
only one time. After that you won't be able to use it again, since by
default it's sharing executors across all instances.
But now that dispatch uses all daemon threads you usually don't have to
shut it down at all. If you use dispatch in a console you should be able
to exit without shutting it down. So, if you can figure out what actions
from your tests are causing Dispatch (or something else?) to spin a
non-daemon thread, then you could perhaps work around the need to call
shutdown explicitly.
Nathan