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

Issue 2050413002: Adds blocking file locks. (Closed)

Created:
4 years, 6 months ago by zra
Modified:
4 years, 6 months ago
Reviewers:
Søren Gjesse, siva
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Base URL:
git@github.com:dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Patch Set 1 #

Patch Set 2 : Fix test for Windows #

Patch Set 3 : Update docs and CHANGELOG #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+232 lines, -16 lines) Patch
M CHANGELOG.md View 1 2 1 chunk +8 lines, -0 lines 0 comments Download
M runtime/bin/file.h View 1 chunk +3 lines, -1 line 0 comments Download
M runtime/bin/file_android.cc View 2 chunks +8 lines, -3 lines 0 comments Download
M runtime/bin/file_linux.cc View 2 chunks +8 lines, -3 lines 0 comments Download
M runtime/bin/file_macos.cc View 2 chunks +8 lines, -3 lines 0 comments Download
M runtime/bin/file_win.cc View 1 chunk +9 lines, -3 lines 0 comments Download
M sdk/lib/io/file.dart View 1 2 3 chunks +15 lines, -1 line 3 comments Download
M sdk/lib/io/file_impl.dart View 3 chunks +14 lines, -2 lines 0 comments Download
A tests/standalone/io/file_blocking_lock_script.dart View 1 1 chunk +50 lines, -0 lines 0 comments Download
A tests/standalone/io/file_blocking_lock_test.dart View 1 1 chunk +109 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (2 generated)
zra
Soren, is there any reason why this wasn't wired up initially?
4 years, 6 months ago (2016-06-10 18:20:35 UTC) #2
Søren Gjesse
On 2016/06/10 18:20:35, zra wrote: > Soren, is there any reason why this wasn't wired ...
4 years, 6 months ago (2016-06-13 06:47:16 UTC) #3
zra
Committed patchset #3 (id:40001) manually as 678cb048ed0eaa96729be7c955c7fadd32cf7024 (presubmit successful).
4 years, 6 months ago (2016-06-13 14:58:14 UTC) #5
siva
lgtm with one comment about the Dart API with regards to asynchronous operations. https://codereview.chromium.org/2050413002/diff/40001/sdk/lib/io/file.dart File ...
4 years, 6 months ago (2016-06-13 15:56:08 UTC) #6
zra
https://codereview.chromium.org/2050413002/diff/40001/sdk/lib/io/file.dart File sdk/lib/io/file.dart (right): https://codereview.chromium.org/2050413002/diff/40001/sdk/lib/io/file.dart#newcode746 sdk/lib/io/file.dart:746: * On 2016/06/13 15:56:08, siva wrote: > This operation ...
4 years, 6 months ago (2016-06-13 16:03:33 UTC) #7
Søren Gjesse
4 years, 6 months ago (2016-06-13 16:05:10 UTC) #8
Message was sent while issue was closed.
https://codereview.chromium.org/2050413002/diff/40001/sdk/lib/io/file.dart
File sdk/lib/io/file.dart (right):

https://codereview.chromium.org/2050413002/diff/40001/sdk/lib/io/file.dart#ne...
sdk/lib/io/file.dart:746: *
On 2016/06/13 15:56:08, siva wrote:
> This operation is not synchronous, should we allow the BLOCKING options to be
> used in this function as a call to this function can potentially block and
seems
> to go against the grain of being asynchronous.

The blocking I/O call is dispatched on the "native isolate" thread-pool, so it
will not block other Dart code from running. However performing blocking lock
calls on more files than there are threads in the native isolate can end up
blocking the native isolate is neither of these calls can gain the lock, so care
should be taken in that case.

I cannot remember how many threads are allocated for the native isolate.

Powered by Google App Engine
This is Rietveld 408576698