Container<T>::operator[]() currently only checks if the access type is READ_ONLY, but insertion should also be disallowed in READ_LINEAR mode.
While debugging this, I noticed that the IO queue was not cleared when encountering exceptions. In order to allow clean destruction, this PR also drains the IO queue in such a case.
Potential future todo: Don't modify the data structures until a flush was successful, so the operation can be repeated. For now, this allows clean destruction and avoids segfaults.
Container<T>::operator[]()
currently only checks if the access type isREAD_ONLY
, but insertion should also be disallowed inREAD_LINEAR
mode.While debugging this, I noticed that the IO queue was not cleared when encountering exceptions. In order to allow clean destruction, this PR also drains the IO queue in such a case. Potential future todo: Don't modify the data structures until a flush was successful, so the operation can be repeated. For now, this allows clean destruction and avoids segfaults.