Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Unified Diff: pkg/front_end/lib/src/byte_store/file_byte_store.dart

Issue 3008013002: Make FileByteStore accept a unique temporary name suffix. (Closed)
Patch Set: Created 3 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/lib/src/byte_store/file_byte_store.dart
diff --git a/pkg/front_end/lib/src/byte_store/file_byte_store.dart b/pkg/front_end/lib/src/byte_store/file_byte_store.dart
index 376f65bf7de007edf1f63fe27a4339c9cb8b615e..10769f598c049cd0a6aa2cb4dcb8d75ba836f62d 100644
--- a/pkg/front_end/lib/src/byte_store/file_byte_store.dart
+++ b/pkg/front_end/lib/src/byte_store/file_byte_store.dart
@@ -142,9 +142,14 @@ class EvictingFileByteStore implements ByteStore {
*/
class FileByteStore implements ByteStore {
final String _cachePath;
- final String _tempName = 'temp_$pid';
+ final String _tempName;
- FileByteStore(this._cachePath);
+ /**
+ * If the same cache path is used from more than one isolate of the same
+ * process, then a unique [tempNameSuffix] must be provided for each isolate.
+ */
+ FileByteStore(this._cachePath, {String tempNameSuffix: ''})
+ : _tempName = 'temp_${pid}_${tempNameSuffix}';
@override
List<int> get(String key) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698