Skip to content

Instantly share code, notes, and snippets.

@cablehead
Created October 16, 2026 01:00
Show Gist options
  • Select an option

  • Save cablehead/f2f0de44a837aa0c4fdbd2da70a8ca30 to your computer and use it in GitHub Desktop.

Select an option

Save cablehead/f2f0de44a837aa0c4fdbd2da70a8ca30 to your computer and use it in GitHub Desktop.
stardust_db_subscription_set_notify: who owns ctx

the caller owns the ctx; stardust just keeps a copy of the pointer. the caller MUST keep that memory valid until stardust_db_subscription_release returns (cancel is not enough), and it must be safe to access from any thread, concurrently with the caller's own code.

it relies on a guarantee from stardust:

After release returns, notify is not running and does not run again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment