<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def queue_put_stoppable(self, q, obj):
 """ Put obj to queue, but will give up when the thread is stopped"""

        while not self.stopped():
            try:
                q.put(obj, timeout=5)
                break
            except queue.Full:
                pass