Clone 5 threads7/6/2023 For instance, there is an unfortunate anti-pattern where people create a class that implements Runnable, then create a Thread as an instance member of this class like this: // Example of anti-pattern, please don't do this! If you are in the position of wanting to clone a Thread, that suggests you have extended Thread where you should have implemented Runnable, or else you have otherwise managed to tie your domain objects to Thread somehow. Like the documentation says, it doesn't make sense to clone a thread, if you want another thread you'd create a new one.
0 Comments
Leave a Reply. |