Comments (7)
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.
@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.
@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.
@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.
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.
Okay, thank you, alirezat775. I think, this issue can be closed?
from downloader.
I close the issue, good luck
from downloader.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from downloader.