HomePhabricator
Diffusion Comm 40b3cf167099

[native_rust_library] make `start_backup_handler` thread-safe

Description

[native_rust_library] make start_backup_handler thread-safe

Summary:
ENG-10001.

In the previous version, code was taking the Future out of the mutex-guarded Option, setting it to None initially. This means the mutex is shortly unlocked after assigning None (calling take), and technically creates a very small window for conditions to change and create new Future.

Test Plan: Login -> logout -> login = no issues about backup upload, user is not logged out automatically

Reviewers: bartek, tomek

Reviewed By: bartek

Subscribers: ashoat

Differential Revision: https://phab.comm.dev/D14095

Details

Provenance
kamilAuthored on Wed, Dec 11, 4:27 AM
Reviewer
bartek
Differential Revision
D14095: [native_rust_library] make `start_backup_handler` thread-safe
Parents
rCOMMd5956ffa57d2: [native] Delete console log
Branches
Unknown
Tags
Unknown