Access db in main thread

Hi

I have created db using [[CBLManager sharedInstance] copy];

If i try to access the cblmodels from the main thread using db pointer obtained from [CBLManager sharedInstance]. It throws thread safety violation.

I don’t have any problem in accessing the models from the background thread. Please help me to understand the reason for this behaviour as well

Whenever i use manager copy, am closing the manager as well. Other wise I receive db as nil sometimes. Please help me to understand the reason for this behaviour

Thanks in advance