Giter VIP home page Giter VIP logo

Comments (7)

alirezat775 avatar alirezat775 commented on July 17, 2024

Hi, this exception raised when creating multiple instances from downloader because you create a new thread for doing a transaction on the database, in downloader library using room library for store download state, so a room doesn't let create a new transaction when close that's already.
You shouldn't use downloader for loading image, so you can use a specific library for image loading like glide, picasso or etc.
An otherwise when using downloader instead of image loader probably you must be solved multi-threading issue

from downloader.

GrishinSergey avatar GrishinSergey commented on July 17, 2024

@alirezat775 , thank you for so quick answer. I decided to use this lib, cuz I don't need to show image in ui, just download it to file storage + progress and beautiful api. So, am I right, if say, for fixing my issue, all I need is create a queue of downloading tasks and just load files one-by-one?

from downloader.

alirezat775 avatar alirezat775 commented on July 17, 2024

@GrishinSergey your welcome, currently supported light-weight queue in the library, so that's mean you can execute download task with a limit resources also you can create a pool of downloader for downloading item with priority in the background and handle multiple downloader objects in the downloader-pool

from downloader.

GrishinSergey avatar GrishinSergey commented on July 17, 2024

@alirezat775, can you show an example, how to use this queue? For now I see database and I understood fo myself that this is that queue about what you saying. Can you show some examples?

from downloader.

alirezat775 avatar alirezat775 commented on July 17, 2024

In the library use android looper for handle multi-thread actions, they implemented in parent asyncTask class.
This sample maybe helpful for implementation thread-pool

from downloader.

GrishinSergey avatar GrishinSergey commented on July 17, 2024

Okay, thank you, alirezat775. I think, this issue can be closed?

from downloader.

alirezat775 avatar alirezat775 commented on July 17, 2024

I close the issue, good luck

from downloader.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.