def stack_size(size=None):
"""Dummy implementation of _thread.stack_size()."""
if size is not None:
raise error("setting thread stack size not supported")
return 0
python类stack_size()的实例源码
def stack_size(size=None):
"""Dummy implementation of _thread.stack_size()."""
if size is not None:
raise error("setting thread stack size not supported")
return 0
def stack_size(size=None):
if size is None:
return _original_stack_size()
if size > _original_stack_size():
return _original_stack_size(size)
else:
pass
# not going to decrease stack_size, because otherwise other greenlets in this thread will suffer
def stack_size(size=None):
if size is None:
return _original_stack_size()
if size > _original_stack_size():
return _original_stack_size(size)
else:
pass
# not going to decrease stack_size, because otherwise other greenlets in this thread will suffer
def stack_size(size=None):
if size is None:
return _original_stack_size()
if size > _original_stack_size():
return _original_stack_size(size)
else:
pass
# not going to decrease stack_size, because otherwise other greenlets in this thread will suffer
def stack_size(size=None):
if size is None:
return _original_stack_size()
if size > _original_stack_size():
return _original_stack_size(size)
else:
pass
# not going to decrease stack_size, because otherwise other greenlets in this thread will suffer
def stack_size(size=None):
if size is None:
return _original_stack_size()
if size > _original_stack_size():
return _original_stack_size(size)
else:
pass
# not going to decrease stack_size, because otherwise other greenlets in this thread will suffer
def stack_size(size=None):
"""Dummy implementation of _thread.stack_size()."""
if size is not None:
raise error("setting thread stack size not supported")
return 0
def stack_size(size=None):
"""Dummy implementation of _thread.stack_size()."""
if size is not None:
raise error("setting thread stack size not supported")
return 0
def stack_size(size=None):
"""Dummy implementation of _thread.stack_size()."""
if size is not None:
raise error("setting thread stack size not supported")
return 0
def stack_size(size=None):
"""Dummy implementation of _thread.stack_size()."""
if size is not None:
raise error("setting thread stack size not supported")
return 0
def stack_size(size=None):
"""Dummy implementation of _thread.stack_size()."""
if size is not None:
raise error("setting thread stack size not supported")
return 0
def stack_size(size=None):
"""Dummy implementation of _thread.stack_size()."""
if size is not None:
raise error("setting thread stack size not supported")
return 0
def stack_size(size=None):
"""Dummy implementation of _thread.stack_size()."""
if size is not None:
raise error("setting thread stack size not supported")
return 0
def stack_size(size=None):
if size is None:
return _original_stack_size()
if size > _original_stack_size():
return _original_stack_size(size)
else:
pass
# not going to decrease stack_size, because otherwise other greenlets in this thread will suffer
def stack_size(size=None):
if size is None:
return _original_stack_size()
if size > _original_stack_size():
return _original_stack_size(size)
else:
pass
# not going to decrease stack_size, because otherwise other greenlets in this thread will suffer
def stack_size(size=None):
"""Dummy implementation of _thread.stack_size()."""
if size is not None:
raise error("setting thread stack size not supported")
return 0
def stack_size(size=None):
"""Dummy implementation of _thread.stack_size()."""
if size is not None:
raise error("setting thread stack size not supported")
return 0
def stack_size(size=None):
if size is None:
return _original_stack_size()
if size > _original_stack_size():
return _original_stack_size(size)
else:
pass
# not going to decrease stack_size, because otherwise other greenlets in this thread will suffer
def stack_size(size=None):
"""Dummy implementation of _thread.stack_size()."""
if size is not None:
raise error("setting thread stack size not supported")
return 0
def stack_size(size=None):
"""Dummy implementation of _thread.stack_size()."""
if size is not None:
raise error("setting thread stack size not supported")
return 0
def stack_size(size=None):
"""Dummy implementation of _thread.stack_size()."""
if size is not None:
raise error("setting thread stack size not supported")
return 0
def stack_size(size=None):
"""Dummy implementation of _thread.stack_size()."""
if size is not None:
raise error("setting thread stack size not supported")
return 0
def stack_size(size=None):
"""Dummy implementation of _thread.stack_size()."""
if size is not None:
raise error("setting thread stack size not supported")
return 0
def stack_size(size=None):
if size is None:
return _original_stack_size()
if size > _original_stack_size():
return _original_stack_size(size)
else:
pass
# not going to decrease stack_size, because otherwise other greenlets in this thread will suffer
def stack_size(size=None):
if size is None:
return _original_stack_size()
if size > _original_stack_size():
return _original_stack_size(size)
else:
pass
# not going to decrease stack_size, because otherwise other greenlets in this thread will suffer
def __init__(self, receive_callback):
self._host = ""
self._port = -1
self._cafile = ""
self._key = ""
self._cert = ""
self._sock = None
self._output_queue_size=-1
self._output_queue_dropbehavior=-1
self._mqttOperationTimeout = 5
self._connection_state = mqttConst.STATE_DISCONNECTED
self._conn_state_mutex=_thread.allocate_lock()
self._poll = select.poll()
self._output_queue=[]
self._out_packet_mutex=_thread.allocate_lock()
_thread.stack_size(5120)
_thread.start_new_thread(self._io_thread_func,())
self._recv_callback = receive_callback
self._pingSent=False
self._ping_interval=20
self._waiting_ping_resp=False
self._ping_cutoff=3
self._receive_timeout=3000
self._draining_interval=2
self._draining_cutoff=3
self._shadow_cb_queue=[]
self._shadow_cb_mutex=_thread.allocate_lock()
def stack_size(size=None):
"""Dummy implementation of _thread.stack_size()."""
if size is not None:
raise error("setting thread stack size not supported")
return 0
def stack_size(size=None):
if size is None:
return _original_stack_size()
if size > _original_stack_size():
return _original_stack_size(size)
else:
pass
# not going to decrease stack_size, because otherwise other greenlets in this thread will suffer
def stack_size(size=None):
"""Dummy implementation of _thread.stack_size()."""
if size is not None:
raise error("setting thread stack size not supported")
return 0