def get (self, timeout=None):
        """ 'get' will block until the processed function returns, timeout
            happens, or the work is cancelled.
            You can test if you were cancelled by the isCancelled() method, and
            you can test if you reached the timeout by the isAlive() method.
            Notice, cancelling will not make 'get' unblock, besides if you build
            'isCancelled' calls into your function.
            
            Warning: the get function assumes that if you are the MainThread you
            have the gdklock and if you are not the MainThread you don't have
            the gdklock.
            If this is not true, and the work is not done, calling get will
            result in a deadlock.
            If you haven't used the gtk.gdk.threads_enter nor
            gtk.gdk.threads_leave function, everything should be fine."""
        
        if not self.isDone():
            if type(currentThread()) == _MainThread:
                threads_leave()
            self.join(timeout)
            if type(currentThread()) == _MainThread:
                threads_enter()
            if self.isAlive():
                return None
            self.done = True
        return self.result
 'get' will block until the processed function returns, timeout
            happens, or the work is cancelled.
            You can test if you were cancelled by the isCancelled() method, and
            you can test if you reached the timeout by the isAlive() method.
            Notice, cancelling will not make 'get' unblock, besides if you build
            'isCancelled' calls into your function.
            
            Warning: the get function assumes that if you are the MainThread you
            have the gdklock and if you are not the MainThread you don't have
            the gdklock.
            If this is not true, and the work is not done, calling get will
            result in a deadlock.
            If you haven't used the gtk.gdk.threads_enter nor
            gtk.gdk.threads_leave function, everything should be fine.
recipes/Python/521881_GtkWorker/recipe-521881.py