fluttercommunity / flutter_workmanager

A Flutter plugin which allows you to execute code in the background on Android and iOS.
825 stars 247 forks source link

🐞[question] is there a way to limit the number of threads in Work Manager? #520

Closed jihuncha closed 7 months ago

jihuncha commented 7 months ago

First of all, I would like to express my gratitude for providing a great plugin. Is there a way to limit the number of threads in Work Manager? In the test app I'm developing, I call registerOneOffTask every time a button is clicked. However, if I call registerOneOffTask too many times, the app crashes. To address this issue, it seems like there is a guide in Android (https://developer.android.com/guide/background/persistent/threading/worker?hl=eng) on limiting the number of threads. Is there a way to apply such a solution within this plugin? If you know of a solution, I would greatly appreciate it if you could share it!

jihuncha commented 7 months ago

sorry. it was my mistake. i have to use same uniquekey in same job (registerOneOffTask). so i closed my issue.