extension_host: Fix `IS_WASM_THREAD` being set for wrong threads (#43005)

https://github.com/zed-industries/zed/pull/40883 implemented this
incorrectly. It was marking a random background thread as a wasm thread
(whatever thread picked up the wasm epoch timer background task),
instead of marking the threads that actually run the wasm extension.

This has two implications:
1. it didn't prevent extension panics from tearing down as planned
2. Worse, it actually made us hide legit panics in sentry for one of our
background workers.

Now 2 still technically applies for all tokio threads after this, but we
basically only use these for wasm extensions in the main zed binary.

Release Notes:

- Fixed extension panics crashing Zed on Linux
94a43dc73aLukas Wirth committed on 11/18/2025, 11:49:22 PM· committed by GitHubparente8e0707
2 files changedLine totals unavailable