[issue23394] No garbage collection at end of main thread

2021-06-16 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23394] No garbage collection at end of main thread

2021-06-16 Thread Irit Katriel


Irit Katriel  added the comment:

For the use case you describe, you could add a close() function to your library 
so that callers can make shutdown explicit, or if you want it to remain 
implicit you could use daemon threads which terminate when the main thread 
exits.

Relying on GC to release objects which then close non-daemonic threads from 
__del__ doesn't sound like a robust design to me.

--
nosy: +iritkatriel

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23394] No garbage collection at end of main thread

2015-02-04 Thread François Trahan

New submission from François Trahan:

When reaching the end of a script, there is no garbage collection done if 
another thread is running.

If you have cyclic references between objects that would be elligible for 
collection under one of which a __del__ would terminate that thread, execution 
will hang at the end of the main thread.

We ended up in this situation; adding gc.collect at the end of our script 
solves the problem, but this is a library and it is not reasonnable to assume 
all our clients will properly ensure every execution path properly forces a 
garbage collection.

Suggestion: at the end of a thread, or at least main thread, force a collection.

--
components: Interpreter Core
messages: 235406
nosy: François.Trahan
priority: normal
severity: normal
status: open
title: No garbage collection at end of main thread
versions: Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23394
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23394] No garbage collection at end of main thread

2015-02-04 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Can you post a simple reproducer so that we can more easily see what you are 
talking about? Thank you.

--
nosy: +pitrou

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23394
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com