8000 Document @UiThread(propagation = Propagation.REUSE) · Issue #871 · androidannotations/androidannotations · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
This repository was archived by the owner on Feb 26, 2023. It is now read-only.

Document @UiThread(propagation = Propagation.REUSE) #871

@tobias-

Description

@tobias-

The best feature of @UiThread that I only found when I was about to feature request & implement it. :)

https://github.com/excilys/androidannotations/wiki/WorkingWithThreads

It might be good to document that delay overrides the propagation parameter. It might even be a good idea to create an issue where the compilation of the class is aborted since they are mutually exclusive.

My suggestion:

Propagation

If you do not want to post the method on the UI Thread when the current Thread is the UI Thread. This can improve debugging and performance.

If combined with delay, propagation will be ignored.

Usage example:

    @UiThread(propagation = Propagation.REUSE)
    void runInSameThreadIfOnUiThread() {
    }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0