diddyJoyBall.py 文件源码

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

项目:diddyborg 作者: piborg 项目源码 文件源码
def run(self):
        # This method runs in a separate thread
        global processingPool
        global lock
        while not self.terminated:
            # Wait for an image to be written to the stream
            if self.event.wait(1):
                try:
                    # Read the image and do some processing on it
                    self.stream.seek(0)
                    self.ProcessImage(self.stream.array)
                finally:
                    # Reset the stream and event
                    self.stream.seek(0)
                    self.stream.truncate()
                    self.event.clear()
                    # Return ourselves to the processing pool
                    with lock:
                        processingPool.append(self)

    # Image processing function
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号