as with most things, can take parameters. Just as you can start a
thread, you can stop as well. We will talk about thread stopping here as
parameters are just like a method parameters. You send values and make
the most of it. You already know about arguments and parameters. This is
similar, but works with threads. First thing to remember is that the
thread takes only 'object' type parameter. After receiving the object,
it is up to you to cast it properly and use it accordingly.
is possible to use a shared variable to make the threads resuming or
not. A shared variable is useful when you want to branch out of threads,
stop them or executing them depending on what the shared variable
As always, associated code has the above illustration. With comments and everything.