Open mmomtchev opened 3 years ago
@mmomtchev I think the correct behavior would be for ds.close()
to throw if work is still ongoing, thoughts?
In the next version ds.close()
will block until the currently running I/O finishes (it cannot be canceled) and then it will cancel all operations that have not yet started - they will end up rejecting with Dataset closed
Frankly, if I had seen this sooner, I would have probably settled for it 😄
But I already implemented a locking hierarchy on top of Brian Revis excellent PtrManager
which manages the lifetime of all datasets
This is not expected to work, but the user should be protected against a segfault.