Skip to content

Commit

Permalink
make multiprocessing.sharedctypes.Value's lock argument a keyword-onl…
Browse files Browse the repository at this point in the history
…y argument for real
  • Loading branch information
benjaminp committed Jun 27, 2008
1 parent ce279a7 commit d5cd65b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions Lib/multiprocessing/sharedctypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,10 @@ def RawArray(typecode_or_type, size_or_initializer):
result.__init__(*size_or_initializer)
return result

def Value(typecode_or_type, *args, **kwds):
def Value(typecode_or_type, *args, lock=None):
'''
Return a synchronization wrapper for a Value
'''
lock = kwds.pop('lock', None)
if kwds:
raise ValueError('unrecognized keyword argument(s): %s' % list(kwds.keys()))
obj = RawValue(typecode_or_type, *args)
if lock is None:
lock = RLock()
Expand Down

0 comments on commit d5cd65b

Please sign in to comment.