Package uk.ac.manchester.spinnaker.utils
Class ThreadUtils
java.lang.Object
uk.ac.manchester.spinnaker.utils.ThreadUtils
Utilities for working with threads.
- 
Method Details- 
threadDumpProduce a dump of what all threads are doing. Useful for debugging as it means you can get a dump of threads programmatically at the time when the problem is likely to be on some thread's stack.- Returns:
- The dump, as a multi-line string.
 
- 
sleeppublic static void sleep(long delay) Recommended way of doing "quiet" sleeps.- Parameters:
- delay- How long to sleep for, in milliseconds.
- See Also:
 
- 
waitforWait for the given object.- Parameters:
- obj- The object to wait for
- Returns:
- True if the wait was interrupted, false otherwise
 
- 
waitforWait for the given object.- Parameters:
- obj- The object to wait for
- timeout- The maximum time to wait, in milliseconds
- Returns:
- True if the wait was interrupted, false otherwise
 
 
-