Read from box from multiple isolates
- Dominant language
- Dart
- Stars
- 4.4k
- Forks
- 449
- PR merge metrics
- No merged PRs in 30d
Description
**Is your feature request related to a problem? Please describe.**
I have audio playing on a separate isolate via audio_service, distinct from the UI. Even when the app is closed, audio can still play.
I need to keep track of where the user is holding in the audio, for
1, continuing from that place next time he starts up the app (even if he closes the background play back).
2. UI things - when user navigates to a file, he should see where he's holding even before play back starts, and even if another class is playing.
Saving the current position has to be done in the background audio isolate, because the UI thread could be closed at any time.
What comes out is that the background thread needs read and write access to the box, and the UI thread needs read access.
**Describe the solution you'd like**
I would like for there to be a way to open a box read only, and such an open would be allowed from multiple threads.
**Describe alternatives you've considered**
Currently, I'm planning on having 2 boxes, one for each thread 🙈
**Version**
- Platform: Android
- Flutter version: 1.12
- Hive version: 1.3.0
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.