[Tutor] How to stop a specific thread in Python 2.7?
Dan Ciprus (dciprus)
dciprus at cisco.com
Fri Oct 11 14:32:40 EDT 2024
Thank you for the hint !
On Fri, Oct 04, 2024 at 09:17:19AM GMT, Cameron Simpson wrote:
>On 03Oct2024 22:12, Dan Ciprus (dciprus) <dciprus at cisco.com> wrote:
>>I'd be interested too :-).
>
>Untested sketch:
>
> def make_thread(target, *a, E=None, **kw):
> '''
> Make a new Event E and Thread T, pass `[E,*a]` as the target
>positional arguments.
> A shared preexisting Event may be supplied.
> Return a 2-tuple of `(T,E)`.
> '''
> if E is None:
> E = Event()
> T = Thread(target=target, args=[E, *a], kwargs=kw)
> return T, E
>
>Something along those lines.
>
>Cheers,
>Cameron Simpson <cs at cskk.id.au>
--
Dan Ciprus
[ curl -L http://git.io/unix ]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://mail.python.org/pipermail/python-list/attachments/20241011/f471a134/attachment.sig>
More information about the Python-list
mailing list