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

Unified Diff: pkg/barback/lib/src/utils.dart

Issue 35923002: Cap the number of FDs used by barback at 32. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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
« pkg/barback/lib/src/file_pool.dart ('K') | « pkg/barback/lib/src/file_pool.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/barback/lib/src/utils.dart
diff --git a/pkg/barback/lib/src/utils.dart b/pkg/barback/lib/src/utils.dart
index ef6a783053871d8b1c3f30f159f0f8358b78287d..a925bec73ae0acd70f4c16bd1bd8e0ba07d79a65 100644
--- a/pkg/barback/lib/src/utils.dart
+++ b/pkg/barback/lib/src/utils.dart
@@ -196,23 +196,3 @@ Stream futureStream(Future<Stream> future) {
});
return controller.stream;
}
-
-// TODO(nweiz): Use a built-in function when issue 14244 is fixed.
-int get maxFileDescriptors {
- if (_maxFileDescriptors != null) return _maxFileDescriptors;
-
- // Running "sh -c ulimit -n" via the command line always reports "unlimited",
- // even when that's clearly false. Instead we fall back on OS-based
- // heuristics.
- if (Platform.isWindows) {
- _maxFileDescriptors = 512;
- return _maxFileDescriptors;
- } else if (Platform.isMacOS) {
- _maxFileDescriptors = 16348;
- return _maxFileDescriptors;
- } else {
- _maxFileDescriptors = 256;
- return _maxFileDescriptors;
- }
-}
-int _maxFileDescriptors;
« pkg/barback/lib/src/file_pool.dart ('K') | « pkg/barback/lib/src/file_pool.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698