/usr/lib/python2.7/dist-packages/PyTango/tango_gevent.py is in python-pytango 8.1.5-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | # ------------------------------------------------------------------------------
# This file is part of PyTango (http://www.tinyurl.com/PyTango)
#
# Copyright 2006-2012 CELLS / ALBA Synchrotron, Bellaterra, Spain
# Copyright 2013-2014 European Synchrotron Radiation Facility, Grenoble, France
#
# Distributed under the terms of the GNU Lesser General Public License,
# either version 3 of the License, or (at your option) any later version.
# See LICENSE.txt for more info.
# ------------------------------------------------------------------------------
from __future__ import absolute_import
__all__ = ["get_global_threadpool", "get_global_executor", "submit", "spawn"]
def get_global_threadpool():
import gevent
return gevent.get_hub().threadpool
def spawn(fn, *args, **kwargs):
return get_global_threadpool().spawn(fn, *args, **kwargs)
get_global_executor = get_global_threadpool
submit = spawn
|