Skip to content

The way to finish a thread in volley. #60

@xyhuangjinfu

Description

@xyhuangjinfu

In volley, to finish a thread such as CacheDiapatcher and NetworkDispatcher, are inturrupt not enough? Whether need the mQuit variable necessarily.
If write like this, hava any problems? those thread can be interrupted in other scenes?
public void quit() { interrupt(); }

while (!isInterrupted()) { ................... try { request = mQueue.take(); } catch (InterruptedException e) { return; } }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions