Files
firezone/swift
Thomas Eizinger dce7ffe4f0 fix(apple): drop Session in a new task (#9478)
Until we implement #3959 for the Apple client, we need to be careful
around how we de-initialise the Rust session. Callback-based designs are
difficult to get right across boundaries because they enable
re-entrances which then lead to runtime errors.

Specifically, freeing the session needs to cleanup the tokio runtime but
that is impossible if the callback is still executed from that exact
runtime. To workaround this, we need to free the session pointer from a
new task.

Moving to #3959 will solve this in a much more intuitive way because we
can ditch the callbacks and instead move to a stream of events that the
host app can consume.

---------

Signed-off-by: Thomas Eizinger <thomas@eizinger.io>
2025-06-10 07:09:16 +00:00
..