Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure you want to rename?
File Manager
/
ALFA_DATA
/
alfasymlink
/
root
/
opt
/
alt
/
python37
/
lib
/
python3.7
/
site-packages
/
paste
/
util
/
__pycache__
:
killthread.cpython-37.pyc
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
B b�N� � @ sT d Z ddlZyddlZW n ek r4 ed��Y nX eed�sHed��dd� ZdS )zB Kill a thread, from http://sebulba.wikispaces.com/recipe+thread2 � Nz=You cannot use paste.util.killthread without ctypes installed� pythonapiz=You cannot use paste.util.killthread without ctypes.pythonapic C s~ t |tjtf�std��t | t�s*td��tj�t� | �t� |��}|dkrVtd��n$|dkrztj�t� | �d� td��dS )z�raises the exception, performs cleanup if needed. tid is the value given by thread.get_ident() (an integer). Raise SystemExit to kill a thread.z(Only types can be raised (not instances)ztid must be an integerr zinvalid thread id� z PyThreadState_SetAsyncExc failedN) � isinstance�typesZ ClassType�type� TypeError�int�ctypesr ZPyThreadState_SetAsyncExc�c_long� py_object� ValueError�SystemError)�tid�exctype�res� r �F/opt/alt/python37/lib/python3.7/site-packages/paste/util/killthread.py�async_raise s r )�__doc__r r �ImportError�hasattrr r r r r �<module> s