Task #6857
How i could unmount container with stopping its threads?
Status: | New | Start date: | 03/22/2016 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | - | % Done: | 0% | |
Category: | - | |||
Target version: | 0.3 | |||
Component: |
Description
Every time, while i open some file to view one more thread is created. Then i close view app. And when i'm trying unmount vfs i've got exception - Cannot unmount when threads are still active! (2 threads). How could i close this threads? How can i unmount vfs? According to my observations this threads are never closed.
History
#1 Updated by hans over 1 year ago
The normal multi-threaded model with IOCipher is that the mount state is automatically managed as part of each thread's lifecycle. When the thread uses IOCipher, it is mounted, when the thread exits, it is unmounted. So you need to make sure that your threads are exiting.
If you are using some kind of thread pool, then you have to use the new beta method detachThread()
: https://github.com/eighthave/IOCipher/commit/ad68d87a55608fcb62d7a37987e590ec579a286b