All Samples(3130) | Call(2573) | Derive(0) | Import(557)
allocate_lock() -> lock object (allocate() is an obsolete synonym) Create a new lock object. See LockType.__doc__ for information about locks.
src/p/y/pyjamas-desktop-HEAD/pyjamas-webkit/examples/jsonrpc/public/services/jsonrpc/__init__.py pyjamas-desktop(Download)
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA """ from threading import Event, Lock from errors import *
def __init__(self, DecoderClass=JSONDecoder, EncoderClass=JSONRPCEncoder, messageDelimiter=""):
self.decoder = DecoderClass()
self.encoder = EncoderClass()
self.partialData = ""
self.respEvents={}
self.respLock = Lock()
self.messageDelimiter=messageDelimiter
src/p/y/pyjamas-desktop-HEAD/pyjamas-web/examples/jsonrpc/public/services/jsonrpc/__init__.py pyjamas-desktop(Download)
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA """ from threading import Event, Lock from errors import *
def __init__(self, DecoderClass=JSONDecoder, EncoderClass=JSONRPCEncoder, messageDelimiter=""):
self.decoder = DecoderClass()
self.encoder = EncoderClass()
self.partialData = ""
self.respEvents={}
self.respLock = Lock()
self.messageDelimiter=messageDelimiter
src/p/y/pyjamas-desktop-HEAD/pyjamas-khtml/examples/jsonrpc/public/services/jsonrpc/__init__.py pyjamas-desktop(Download)
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA """ from threading import Event, Lock from errors import *
def __init__(self, DecoderClass=JSONDecoder, EncoderClass=JSONRPCEncoder, messageDelimiter=""):
self.decoder = DecoderClass()
self.encoder = EncoderClass()
self.partialData = ""
self.respEvents={}
self.respLock = Lock()
self.messageDelimiter=messageDelimiter
src/k/a/kamaelia-HEAD/trunk/Sketches/MPS/Examples/LUGRadio/likefile.py kamaelia(Download)
class schedulerThread(threading.Thread):
"""A python thread which runs a scheduler."""
lock = threading.Lock()
def __init__(self,slowmo=0):
if not schedulerThread.lock.acquire(False):
raise "only one scheduler for now can be run!"
self.slowmo = slowmo
src/k/a/kamaelia-HEAD/Sketches/MPS/Examples/LUGRadio/likefile.py kamaelia(Download)
class schedulerThread(threading.Thread):
"""A python thread which runs a scheduler."""
lock = threading.Lock()
def __init__(self,slowmo=0):
if not schedulerThread.lock.acquire(False):
raise "only one scheduler for now can be run!"
self.slowmo = slowmo
src/p/r/processing-0.52/examples/benchmarks.py processing(Download)
print
print '\n\t######## testing threading.Lock\n'
test_lockspeed(threading.Lock())
print '\n\t######## testing threading.RLock\n'
test_lockspeed(threading.RLock())
print '\n\t######## testing processing.Lock\n'
src/p/y/python-cookbook-HEAD/cb2_examples/cb2_13_13_sol_1.py python-cookbook(Download)
import sys, socket, time, threading
LOGGING = True
loglock = threading.Lock()
def log(s, *a):
if LOGGING:
loglock.acquire()
try:
print '%s:%s' % (time.ctime(), (s % a))
sys.stdout.flush()
finally:
loglock.release()
class PipeThread(threading.Thread):
pipes = []
pipeslock = threading.Lock()
src/d/i/diksel-HEAD/trunk/thirdparty/pyjamasdev/examples/jsonrpc/public/services/jsonrpc/__init__.py diksel(Download)
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA """ from threading import Event, Lock from errors import *
def __init__(self, DecoderClass=JSONDecoder, EncoderClass=JSONRPCEncoder, messageDelimiter=""):
self.decoder = DecoderClass()
self.encoder = EncoderClass()
self.partialData = ""
self.respEvents={}
self.respLock = Lock()
self.messageDelimiter=messageDelimiter
src/d/i/diksel-HEAD/trunk/thirdparty/pyjamasdev/examples/infohierarchy/public/services/jsonrpc/__init__.py diksel(Download)
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA """ from threading import Event, Lock from errors import *
def __init__(self, DecoderClass=JSONDecoder, EncoderClass=JSONRPCEncoder, messageDelimiter=""):
self.decoder = DecoderClass()
self.encoder = EncoderClass()
self.partialData = ""
self.respEvents={}
self.respLock = Lock()
self.messageDelimiter=messageDelimiter
src/d/i/dionea-HEAD/dionea/trunk/sample/python/testP-C.py dionea(Download)
class MakerThread(threading.Thread):
id=0
lock=threading.Lock()
def __init__(self,name,table,seed):
threading.Thread.__init__(self)
self.name=name
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 Next