本文整理汇总了Python中multiprocessing.Queue.access方法的典型用法代码示例。如果您正苦于以下问题:Python Queue.access方法的具体用法?Python Queue.access怎么用?Python Queue.access使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类multiprocessing.Queue
的用法示例。
在下文中一共展示了Queue.access方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Queue
# 需要导入模块: from multiprocessing import Queue [as 别名]
# 或者: from multiprocessing.Queue import access [as 别名]
# using options.config in run.py (python -m emissary.run -c somefile.py)
app.config.from_object("emissary.config")
app.version = "2.0.0"
app.inbox = Queue()
app.scripts = None
app.feedmanager = None
app.config["HTTP_BASIC_AUTH_REALM"] = "Emissary " + app.version
# These are response queues that enable the main thread of execution to
# share data with the REST interface. Mainly for reporting the status of crontabs.
app.queues = []
for i in range(cpu_count() * 2):
q = Queue()
q.access = time.time()
app.queues.append(q)
db = SQLAlchemy(app)
api = restful.Api(app, prefix='/v1')
def init():
# Models are imported here to prevent a circular import where we would
# import models and the models would import that db object just above us.
# They're also imported here in this function because they implicitly
# monkey-patch the threading module, and we might not need that if all we want
# from the namespace is something like app.version, like in repl.py for example.
from models import APIKey
from models import FeedGroup
from models import Feed