Merge tag 'full_of_que_exception' into develop
v0.0.6.2
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
pytchat is a python library for fetching youtube live chat without using yt api, Selenium, or BeautifulSoup.
|
||||
"""
|
||||
__copyright__ = 'Copyright (C) 2019 taizan-hokuto'
|
||||
__version__ = '0.0.6.1'
|
||||
__version__ = '0.0.6.2'
|
||||
__license__ = 'MIT'
|
||||
__author__ = 'taizan-hokuto'
|
||||
__author_email__ = '55448286+taizan-hokuto@users.noreply.github.com'
|
||||
|
||||
@@ -20,6 +20,13 @@ class Buffer(asyncio.Queue):
|
||||
super().get_nowait()
|
||||
await super().put(item)
|
||||
|
||||
def put_nowait(self,item):
|
||||
if item is None:
|
||||
return
|
||||
if super().full():
|
||||
super().get_nowait()
|
||||
super().put_nowait(item)
|
||||
|
||||
async def get(self):
|
||||
ret = []
|
||||
ret.append(await super().get())
|
||||
|
||||
@@ -22,6 +22,13 @@ class Buffer(queue.Queue):
|
||||
else:
|
||||
super().put(item)
|
||||
|
||||
def put_nowait(self,item):
|
||||
if item is None:
|
||||
return
|
||||
if super().full():
|
||||
super().get_nowait()
|
||||
else:
|
||||
super().put_nowait(item)
|
||||
|
||||
def get(self):
|
||||
ret = []
|
||||
|
||||
Reference in New Issue
Block a user