Skip to main content

update_thread

Function update_thread 

Source
pub fn update_thread(
    id: &str,
    create: impl FnOnce() -> Option<Thread>,
    change: impl FnOnce(&mut Thread),
) -> Result<Option<Thread>>
Expand description

Change the thread id under its lock, so two writers never lose each other’s participants, and return it as saved. create makes it when it is not kept yet.