????JFIF??x?x????'
Server IP : 79.136.114.73 / Your IP : 3.148.243.252 Web Server : Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.29 OpenSSL/1.0.1f System : Linux b8009 3.13.0-170-generic #220-Ubuntu SMP Thu May 9 12:40:49 UTC 2019 x86_64 User : www-data ( 33) PHP Version : 5.5.9-1ubuntu4.29 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /proc/self/root/home/b8009/Python-3.6.3/Lib/test/ |
Upload File : |
# This is a helper module for test_threaded_import. The test imports this # module, and this module tries to run various Python library functions in # their own thread, as a side effect of being imported. If the spawned # thread doesn't complete in TIMEOUT seconds, an "appeared to hang" message # is appended to the module-global `errors` list. That list remains empty # if (and only if) all functions tested complete. TIMEOUT = 10 import threading import tempfile import os.path errors = [] # This class merely runs a function in its own thread T. The thread importing # this module holds the import lock, so if the function called by T tries # to do its own imports it will block waiting for this module's import # to complete. class Worker(threading.Thread): def __init__(self, function, args): threading.Thread.__init__(self) self.function = function self.args = args def run(self): self.function(*self.args) for name, func, args in [ # Bug 147376: TemporaryFile hung on Windows, starting in Python 2.4. ("tempfile.TemporaryFile", lambda: tempfile.TemporaryFile().close(), ()), # The real cause for bug 147376: ntpath.abspath() caused the hang. ("os.path.abspath", os.path.abspath, ('.',)), ]: try: t = Worker(func, args) t.start() t.join(TIMEOUT) if t.is_alive(): errors.append("%s appeared to hang" % name) finally: del t