Message 298342 - Python tracker (original) (raw)

Hi, I attempted Nick's proposal and removed unused codes from TLS implementation (bpo-30279, bpo-30832). This change looks good to me (PR 1362). As the result, I think ready to be more slim API because the own implementation for TLS was removed. Therefore, additional proposal to two API functions:

These functions have handled memory deallocation to key-value storage on the own implementation, but above said, currently the own implementation is gone. It means:

  1. PyThread_ReInitTSS makes to be no-op for all supported platforms (Windows and pthreads)
  2. likewise PyThread_tss_delete_value just does to empty the storage (i.e. "PyThread_tss_delete_value(key)" makes to be equal to "PyThread_tss_set(key, NULL)").

We (or at least I) won't get back to the own implementation, therefore, I suggest to omit these functions for new TSS API.

See proposed updates https://github.com/ma8ma/cpython/pull/1