Skip to content

Commit

Permalink
Queue is already threadsafe.
Browse files Browse the repository at this point in the history
Refs #2874
  • Loading branch information
coleifer committed Apr 19, 2024
1 parent e6483e2 commit 7dcaf9c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions playhouse/sqliteq.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,12 +286,10 @@ def is_stopped(self):
return self._is_stopped

def pause(self):
with self._qlock:
self._write_queue.put(PAUSE)
self._write_queue.put(PAUSE)

def unpause(self):
with self._qlock:
self._write_queue.put(UNPAUSE)
self._write_queue.put(UNPAUSE)

def __unsupported__(self, *args, **kwargs):
raise ValueError('This method is not supported by %r.' % type(self))
Expand Down

0 comments on commit 7dcaf9c

Please sign in to comment.