main.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:vivisect-py3 作者: bat-serjo 项目源码 文件源码
def boredthread(func):
    """
    The same as "workthread" above, but drop the request on the
    floor if the worker thread already has better things to do...
    """

    # If we're already the work thread, just do it.
    def workadd(*args, **kwargs):
        if getattr(currentThread(), 'VQtWorkerThread', False):
            return func(*args, **kwargs)

        if not len(workerq):
            workerq.append((func, args, kwargs))

    functools.update_wrapper(workadd, func)
    return workadd
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号