If the variable is used in a single thread it's fine.
It seemed to me that the BlockComplete function and the while loop were in 2 different threads.
Sorry for the confusion.
If the variable is used in a single thread it's fine.
It seemed to me that the BlockComplete function and the while loop were in 2 different threads.
Sorry for the confusion.
Alberth said:
If the variable is used in a single thread it's fine.
It seemed to me that the BlockComplete function and the while loop were in 2 different threads.
Sorry for the confusion.
Don't worry xD.
I'm thinking, maybe using a shared_ptr I could share the instance that I want to the FileReader so it can callback, but I have a few custom allocators, some objects are created by PoolAllocator, so I don't know if I can use shared_ptr for that.