Page MenuHomePhabricator

[native_rust_library] make `start_backup_handler` thread-safe
ClosedPublic

Authored by kamil on Wed, Dec 11, 4:33 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Dec 29, 9:02 AM
Unknown Object (File)
Sun, Dec 29, 2:40 AM
Unknown Object (File)
Fri, Dec 27, 1:25 PM
Unknown Object (File)
Thu, Dec 26, 8:25 AM
Unknown Object (File)
Wed, Dec 25, 7:55 AM
Unknown Object (File)
Sun, Dec 22, 9:51 AM
Unknown Object (File)
Sun, Dec 22, 3:23 AM
Unknown Object (File)
Sat, Dec 21, 9:06 PM
Subscribers

Details

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

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage