Skip to content
Snippets Groups Projects
Commit 67431ec9 authored by Rene Brun's avatar Rene Brun
Browse files

From Gerri:

Fix an important bug introduced in the latest change by Fabrizio.


git-svn-id: http://root.cern.ch/svn/root/trunk@20692 27541ba8-7e3a-0410-8455-c3a389f83636
parent 70f5c84e
No related branches found
No related tags found
No related merge requests found
...@@ -93,12 +93,13 @@ TFileCacheRead::TFileCacheRead(TFile *file, Int_t buffersize) ...@@ -93,12 +93,13 @@ TFileCacheRead::TFileCacheRead(TFile *file, Int_t buffersize)
fFirstIndexToPrefetch = 0; fFirstIndexToPrefetch = 0;
fAsyncReading = gEnv->GetValue("TFile.AsyncReading", 1); fAsyncReading = gEnv->GetValue("TFile.AsyncReading", 1);
if (fAsyncReading) { if (fAsyncReading) {
// If asynchronous reading is not supported by this TFile specialization // Check if asynchronous reading is supported by this TFile specialization
fAsyncReading = kFALSE;
if (file && !(file->ReadBufferAsync(0, 0)))
fAsyncReading = kTRUE;
} else {
// we use sync primitives, hence we need the local buffer // we use sync primitives, hence we need the local buffer
if (file && file->ReadBufferAsync(0, 0)) { fBuffer = new char[fBufferSize];
fAsyncReading = kFALSE;
fBuffer = new char[fBufferSize];
}
} }
fIsSorted = kFALSE; fIsSorted = kFALSE;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment