<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def process_request_thread(self, request, client_address):
 """ Same as in BaseServer but as a thread. In addition, exception handling is done here. """

        from ..blockstackd import get_gc_thread

        try:
            self.finish_request(request, client_address)
        except Exception:
            self.handle_error(request, client_address)
        finally:
            self.shutdown_request(request)

        shutdown_thread = False
        with self._thread_guard:
            if threading.current_thread().ident in self._threads:
                del self._threads[threading.current_thread().ident]
                shutdown_thread = True

                if BLOCKSTACK_TEST:
                    log.debug('{} active threads (removed {})'.format(len(self._threads), threading.current_thread().ident))

        if shutdown_thread:
            gc_thread = get_gc_thread()
            if gc_thread:
                # count this towards our preemptive garbage collection
                gc_thread.gc_event()