NativeScript iOS Daily: Fixing Hung Promises From Background Threads

A single merged fix resolves a longstanding bug where promises created while native code runs JavaScript on a background thread could hang forever. The change, in PR 396, closes out issue 330.

Duration: PT2M2S

Episode overview

This episode is a short developer briefing from NativeScript iOS Daily.

It explains recent repository work in plain language.

  • Show: NativeScript iOS Daily
  • Published: 2026-07-08T13:15:09Z
  • Audio duration: PT2M2S

Transcript excerpt

This excerpt keeps the crawler page concise. Listen to the episode or use the RSS feed for the full update.

Good day, and welcome to NativeScript iOS Daily for July 8th, 2026.

Today's focus is a single fix, but it targets a real reliability gap in how promises behave across threads.

Here's the core problem, as described in PR 396 from Adrian Niculescu. The promise proxy captures whatever run loop is active at the moment a promise is created. Normally, that's fine. But if native code runs JavaScript on a background thread, the promise proxy locks onto that background thread's run loop. Once that…

The fix, captured in commit 721633a, changes the rule: only marshal the resolution back to a captured run loop when the promise was actually created on the runtime loop, since that loop is guaranteed to always be pumped. For promises created anywhere else, the resolution now happens inline, on whatever thread…

The developer impact here is straightforward: this was a class of bug where async code could silently stop working depending on which thread created the promise, with no error, just a permanent hang. That's a hard failure mode to debug in the field. Closing issue 330 removes that risk for any native-to-JS call…

What's next: if you've worked around hanging promises in background-thread call…

Nearby episodes from NativeScript iOS Daily

  1. URL Pattern Bug Squashed