Skip to content

Document that clear_all! is dangerous #67

@fsateler

Description

@fsateler

The documentation of clear! and clear_all are quite similar:

Public: Removes all the request-local variables

Public: Clears all the request-local variable stores

However, clear_all! is something you almost never want to call: it immediately destroys the information that may be in use by other threads.

It would be nice to document this. Maybe something along the lines of:

clear!
Removes all the request-local variables for the current request. This method will clear the local storage for the currently executing request.

clear_all!
Clears all the request-local variable stores. This method will clear the local storage for all requests. This method should not be called during normal operation as it will destroy the storage of unrelated threads.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions