Martin Kustermann
3d53df52af
Revert "[vm] Call OSThread::Cleanup() during VM shutdown (as with all other Init/Cleanup functions)"
...
See b/157883819: Custom embedder doesn't correctly join threads that
interacted with Dart API, which causes us to hit the newly added
RELEASE_ASSERT.
This reverts commit ea4b17533c .
Change-Id: I9fec45196646f67ae46efccc2f83a43e8941a626
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149592
Reviewed-by: David Morgan <davidmorgan@google.com >
Commit-Queue: Martin Kustermann <kustermann@google.com >
2020-06-02 13:25:01 +00:00
Martin Kustermann
ea4b17533c
[vm] Call OSThread::Cleanup() during VM shutdown (as with all other Init/Cleanup functions)
...
Change-Id: I3cfa51714247a62fe39951636ca1a75c34f6c95b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149293
Reviewed-by: Ben Konyi <bkonyi@google.com >
Commit-Queue: Martin Kustermann <kustermann@google.com >
2020-05-29 08:02:59 +00:00
Ryan Macnak
75c41e91e3
[vm, test] Fix data races in vm/cc/ThreadPool_*
...
Bug: https://github.com/dart-lang/sdk/issues/39611
Change-Id: Ie8d6d29dba2f0c22af0158499565ccd55081a3b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138050
Commit-Queue: Ryan Macnak <rmacnak@google.com >
Reviewed-by: Siva Annamalai <asiva@google.com >
Reviewed-by: Martin Kustermann <kustermann@google.com >
2020-03-03 18:28:34 +00:00
Matthew Dempsky
303dfdf9b5
[vm] Use std::unique_ptr for ThreadPool::Task
...
Updates #37244 .
Change-Id: I32a5180a17fe43be5e18367d784cf756dffc6aeb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106009
Commit-Queue: Matthew Dempsky <mdempsky@google.com >
Reviewed-by: Régis Crelier <regis@google.com >
2019-06-18 17:51:10 +00:00
Zachary Anderson
6cd8a79078
VM: Re-format to use at most one newline between functions
...
R=asiva@google.com
Review-Url: https://codereview.chromium.org/2974233002 .
2017-07-13 08:08:37 -07:00
Ben Konyi
f2fd150ea0
Added new type of unit test, RAW_UNIT_TEST_CASE, which is used for tests that can be flaky if run while the VM is alive. Tests created using the RAW_UNIT_TEST_CASE macro will run after the VM has shutdown to avoid having any worker threads contaminating the test results.
...
BUG=
R=johnmccutchan@google.com
Review-Url: https://codereview.chromium.org/2666133002 .
2017-01-31 15:16:38 -08:00
Zachary Anderson
a1bcf051d8
clang-format runtime/vm
...
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org/2481873005 .
2016-11-08 13:54:47 -08:00
Zachary Anderson
2113134d4d
Fix thread pool tests
...
fixes #26957
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/2478243004 .
2016-11-04 09:50:34 -07:00
Zachary Anderson
7093f2996b
VM thread shutdown.
...
BUG=
R=iposva@google.com , turnidge@google.com
Review URL: https://codereview.chromium.org//1275353005 .
2015-09-15 12:49:52 -07:00
Zachary Anderson
d4d89d6f12
Reverts VM thread cleanup
...
BUG=
Review URL: https://codereview.chromium.org//1275853008 .
2015-08-07 19:10:31 -07:00
Zachary Anderson
55bfb3d54b
Clean VM thread shutdown:
...
Second attempt at: https://codereview.chromium.org/1177153005/
This time with fixed error propagation in the embedder.
R=turnidge@google.com
Review URL: https://codereview.chromium.org//1279733003 .
2015-08-07 18:42:00 -07:00
Zachary Anderson
4ca87e6d88
Revert VM thread cleanup
...
TBR
BUG=
Review URL: https://codereview.chromium.org//1270323002 .
2015-08-05 01:27:01 -07:00
Zachary Anderson
174d552574
Enables clean VM shutdown.
...
. Disables isolate spawning during Dart_Cleanup.
. Adds a static call Isolate::KillAllIsolates, which sends the
OOB Kill message to all isolates when called from
Dart_Cleanup.
. Modifies thread pool shutdown to block until all threads have
exited.
. Fixes tests.
BUG=
R=turnidge@google.com
Review URL: https://codereview.chromium.org//1177153005 .
2015-08-04 23:29:25 -07:00
iposva@google.com
03e8b14ed9
- Address review comments from https://codereview.chromium.org/474913004/
...
- Clearly mark overrides of ThreadPool::Task::Run as virtual.
Review URL: https://codereview.chromium.org//480343003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39418 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-20 18:37:29 +00:00
iposva@google.com
14ecdbd66a
- Separate the thread implementation used in bin/ and vm/
...
to allow us to make VM specific changes.
R=asiva@google.com
Review URL: https://codereview.chromium.org//463993002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39172 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-12 23:19:53 +00:00
turnidge@google.com
5f3f461557
Fix failing test on windows. I was accessing a stat too early.
...
Review URL: https://chromiumcodereview.appspot.com//9706033
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5487 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-14 21:19:03 +00:00
turnidge@google.com
d1ed3d8850
Another fix for non-mac build:
...
../runtime/platform/assert.h: In member function ‘void dart::DynamicAssertionHelper::Equals(const E&, const A&) [with E = int, A = uint64_t]’:
../runtime/vm/thread_pool_test.cc:64: instantiated from here
../runtime/platform/assert.h:98: error: comparison between signed and unsigned integer expressions
Review URL: https://chromiumcodereview.appspot.com//9704037
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5486 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-14 21:10:33 +00:00
turnidge@google.com
e420a07ee3
Implement ThreadPool.
...
Review URL: https://chromiumcodereview.appspot.com//9581039
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5484 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-14 21:00:45 +00:00