previous | start | next

## Sensing Interruptions

    public class MyRunnable implements Runnable

    {

       public void run()

       {

          try

          {

             while (...)

             {

               do work

                Thread.sleep(...);

             }

          }

          catch (InterruptedException e) {}

          clean up

       }

    }

previous | start | next