This doesn't actually work, because cfg(target = "...") is an unstable feature (RFC) and was not enabled.
Using the worker name as a thread ID is quite unreliable, as they are simply an empty string if not set during their creation, which is commonly not done. Certainly there is nothing in place to make them unique.
In the meantime, thread-id now supports wasm32-unknown-unknown (https://github.com/ruuda/thread-id/pull/12) in v4.1, so parking_lot_core now inherited that support without any changes required.
This reverts https://github.com/Amanieu/parking_lot/pull/379 for two reasons:
cfg(target = "...")
is an unstable feature (RFC) and was not enabled.In the meantime,
thread-id
now supportswasm32-unknown-unknown
(https://github.com/ruuda/thread-id/pull/12) in v4.1, soparking_lot_core
now inherited that support without any changes required.