diff options
author | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-21 01:34:16 +0000 |
---|---|---|
committer | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-21 01:34:16 +0000 |
commit | aef050626d6412bffa292cbfcee23107cadc4b5d (patch) | |
tree | 284b984780abb88b8a54fb56da104b58a4e2f38e /net/disk_cache | |
parent | 3fbb9b1503c174d38e6134d8863d0649b4fa93b7 (diff) | |
download | chromium_src-aef050626d6412bffa292cbfcee23107cadc4b5d.zip chromium_src-aef050626d6412bffa292cbfcee23107cadc4b5d.tar.gz chromium_src-aef050626d6412bffa292cbfcee23107cadc4b5d.tar.bz2 |
Fix WaitForPendingIO to actually exit the wait at some point.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1143 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/disk_cache')
-rw-r--r-- | net/disk_cache/backend_impl.cc | 2 | ||||
-rw-r--r-- | net/disk_cache/cache_util.h | 2 | ||||
-rw-r--r-- | net/disk_cache/cache_util_posix.cc | 4 | ||||
-rw-r--r-- | net/disk_cache/cache_util_win.cc | 4 |
4 files changed, 6 insertions, 6 deletions
diff --git a/net/disk_cache/backend_impl.cc b/net/disk_cache/backend_impl.cc index 74eabbc..9b15d5e 100644 --- a/net/disk_cache/backend_impl.cc +++ b/net/disk_cache/backend_impl.cc @@ -262,7 +262,7 @@ BackendImpl::~BackendImpl() { delete timer_; delete timer_task_; - WaitForPendingIO(num_pending_io_); + WaitForPendingIO(&num_pending_io_); DCHECK(!num_refs_); } diff --git a/net/disk_cache/cache_util.h b/net/disk_cache/cache_util.h index dcb82c2..dd14379 100644 --- a/net/disk_cache/cache_util.h +++ b/net/disk_cache/cache_util.h @@ -55,7 +55,7 @@ void DeleteCache(const std::wstring& path, bool remove_folder); bool DeleteCacheFile(const std::wstring& name); // Blocks until |num_pending_io| IO operations complete. -void WaitForPendingIO(int num_pending_io); +void WaitForPendingIO(int* num_pending_io); } // namespace disk_cache diff --git a/net/disk_cache/cache_util_posix.cc b/net/disk_cache/cache_util_posix.cc index a6055fa..7eed9dd 100644 --- a/net/disk_cache/cache_util_posix.cc +++ b/net/disk_cache/cache_util_posix.cc @@ -64,8 +64,8 @@ bool DeleteCacheFile(const std::wstring& name) { return file_util::Delete(name, false); } -void WaitForPendingIO(int num_pending_io) { - if (num_pending_io) { +void WaitForPendingIO(int* num_pending_io) { + if (*num_pending_io) { NOTIMPLEMENTED(); } } diff --git a/net/disk_cache/cache_util_win.cc b/net/disk_cache/cache_util_win.cc index cb38b5f..2c1457c 100644 --- a/net/disk_cache/cache_util_win.cc +++ b/net/disk_cache/cache_util_win.cc @@ -111,8 +111,8 @@ bool DeleteCacheFile(const std::wstring& name) { return DeleteFile(name.c_str()) ? true : false; } -void WaitForPendingIO(int num_pending_io) { - while (num_pending_io) { +void WaitForPendingIO(int* num_pending_io) { + while (*num_pending_io) { // Asynchronous IO operations may be in flight and the completion may end // up calling us back so let's wait for them (we need an alertable wait). // The idea is to let other threads do usefull work and at the same time |