Skip to content

Commit

Permalink
[GH-16] Support multithreading for PDict (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
Murray-LIANG authored Jun 5, 2017
1 parent 3a3a59c commit 9c5cf06
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion persistqueue/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# coding=utf-8
__author__ = 'Peter Wang'
__license__ = 'BSD License'
__version__ = '0.2.2'
__version__ = '0.2.3'

from .exceptions import Empty, Full # noqa
from .pdict import PDict # noqa
Expand Down
5 changes: 3 additions & 2 deletions persistqueue/pdict.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ class PDict(sqlbase.SQLiteBase, dict):
'WHERE {key_column} = ?')
_SQL_UPDATE = 'UPDATE {table_name} SET data = ? WHERE {key_column} = ?'

def __init__(self, path, name):
super(PDict, self).__init__(path, name=name)
def __init__(self, path, name, multithreading=False):
super(PDict, self).__init__(path, name=name,
multithreading=multithreading)

def __iter__(self):
raise NotImplementedError('Not supported.')
Expand Down
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[bdist_wheel]
universal = 1

0 comments on commit 9c5cf06

Please sign in to comment.