Extension modules, Threading, and the GIL

Martin v. Löwis martin at v.loewis.de
Thu Jan 2 18:05:37 EST 2003


Skip Montanaro <skip at pobox.com> writes:

> Perhaps a ThreadIdentifier class should be developed as an abstraction of
> the thread id.  Instances of that class would then encapsulate the actual
> identifier returned by the specific thread package being used.  Make
> ThreadIdentifier immutable so you can use it in the aforementioned fake TLS.

The problem is that the result of thread.get_ident() is documented as
"a nonzero integer". It is likely that applications rely on that
property.

Regards,
Martin





More information about the Python-list mailing list