title: Calling Method at the End of Program Execution
body: <p>I am creating a client library for an API endpoint using <a href="https://github.com/Mashape/unirest-java" rel="nofollow"><code>Unirest</code></a> to simulate <code>GET</code> and <code>POST</code> requests. Once the program finishes, the following code must be called in order to terminate the current thread.</p>
  
  <pre><code>Unirest.shutdown(); // must be called in order to clear the high CPU consuming thread 
  </code></pre>
  
  <p>Is there any possible way implicitly call this in my client library at the end of the program's execution?</p>