diff options
author | truckman <truckman@FreeBSD.org> | 2016-02-11 03:11:22 +0800 |
---|---|---|
committer | truckman <truckman@FreeBSD.org> | 2016-02-11 03:11:22 +0800 |
commit | 95e7c256b2e0e0d389fada001bc1cdefa8dc72da (patch) | |
tree | 4a7f2e072511b7c31f91028bfc9a9492a3db81c2 /devel | |
parent | 53500da4db7103ca23674d8df0c44417e1621164 (diff) | |
download | freebsd-ports-gnome-95e7c256b2e0e0d389fada001bc1cdefa8dc72da.tar.gz freebsd-ports-gnome-95e7c256b2e0e0d389fada001bc1cdefa8dc72da.tar.zst freebsd-ports-gnome-95e7c256b2e0e0d389fada001bc1cdefa8dc72da.zip |
New port devel/py-terminable_thread:
terminable_thread provides a subclass of threading.Thread, adding
the facility to raise exceptions in the context of the given
thread.
This facility is incorporated in the terminable_thread.Thread
methods raise_exc, which raises an arbitrary exception, and
terminate, which raises SystemExit.
This is not done in an entirely robust manner, and there may be
unreported issues with it.
It uses the unexposed PyThreadState_SetAsyncExc function (via
ctypes) to raise an exception for the given thread.
Sponsored by: Farsight Security, Inc.
Diffstat (limited to 'devel')
-rw-r--r-- | devel/Makefile | 1 | ||||
-rw-r--r-- | devel/py-terminable_thread/Makefile | 20 | ||||
-rw-r--r-- | devel/py-terminable_thread/distinfo | 2 | ||||
-rw-r--r-- | devel/py-terminable_thread/pkg-descr | 17 |
4 files changed, 40 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile index 1e3225d7979a..3e86ce7682ed 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -4379,6 +4379,7 @@ SUBDIR += py-tempora SUBDIR += py-tempstorage SUBDIR += py-termcolor + SUBDIR += py-terminable_thread SUBDIR += py-termstyle SUBDIR += py-testgears SUBDIR += py-testoob diff --git a/devel/py-terminable_thread/Makefile b/devel/py-terminable_thread/Makefile new file mode 100644 index 000000000000..16b1862bdd0a --- /dev/null +++ b/devel/py-terminable_thread/Makefile @@ -0,0 +1,20 @@ +# $FreeBSD$ + +PORTNAME= terminable_thread +PORTVERSION= 0.7.1 +PORTREVISION= 1 +CATEGORIES= devel python +MASTER_SITES= CHEESESHOP +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= truckman@FreeBSD.org +COMMENT= Thread subclass / raise exceptions or terminate from another thread + +LICENSE= PD +LICENSE_FILE= ${WRKSRC}/COPYING + +NO_ARCH= yes +USES= python +USE_PYTHON= distutils autoplist + +.include <bsd.port.mk> diff --git a/devel/py-terminable_thread/distinfo b/devel/py-terminable_thread/distinfo new file mode 100644 index 000000000000..6b97c4d93bc3 --- /dev/null +++ b/devel/py-terminable_thread/distinfo @@ -0,0 +1,2 @@ +SHA256 (terminable_thread-0.7.1.tar.gz) = c07d98a8230568757cffd13c6315409db45f6f479c4e3640df84b2225db10b27 +SIZE (terminable_thread-0.7.1.tar.gz) = 5247 diff --git a/devel/py-terminable_thread/pkg-descr b/devel/py-terminable_thread/pkg-descr new file mode 100644 index 000000000000..2c11427d5cbc --- /dev/null +++ b/devel/py-terminable_thread/pkg-descr @@ -0,0 +1,17 @@ +Provides a subclass of Thread with facilities to raise an exception +in the thread or terminate the thread from another thread. + +terminable_thread provides a subclass of threading.Thread, adding +the facility to raise exceptions in the context of the given thread. + +This facility is incorporated in the terminable_thread.Thread methods +raise_exc, which raises an arbitrary exception, and terminate, which +raises SystemExit. + +This is not done in an entirely robust manner, and there may be +unreported issues with it. + +It uses the unexposed PyThreadState_SetAsyncExc function (via ctypes) +to raise an exception for the given thread. + +WWW: http://github.com/intuited/terminable_thread |