diff options
| author | 2024-06-05 16:06:33 -0700 | |
|---|---|---|
| committer | 2024-06-26 19:40:34 +0000 | |
| commit | 330fb44dd9845a229ac1024fab0eed366ac2ab69 (patch) | |
| tree | 7e1ed7777d362e4234561f0fa73a22570f832a5e /compiler/optimizing/code_generator.h | |
| parent | 83cc7f2316fe6f3584483543b54033bd7885b0db (diff) | |
Add 2275-pthread-name test for Thread.setName
This checks that we set the pthread name correctly in response to
Thread.setName() calls.
We did not. In fact, we incorrectly set the pthread name for the calling
thread, rather than the `this` thread.
Fix that, by never erroneously setting the calling threads name, and by
making a good effort to set the correct one. This difers from the
documented RI behavior of setting the pthread name only if this == self.
That decision is not a slam dunk either way, and opinions are welcome.
This approach almost certainly matches naive expectations more of the
time, but it currently has the disadvantage that it can fail under much
less common, but also much less predictable, circumstances.
It could possibly be made fully predictable if we managed to clean
up some other issues, which I highlighted in the code.
Test: Host run tests, Treehugger
Change-Id: I295e0af0157a530919df4120c5dbf347dd9416a2
Diffstat (limited to 'compiler/optimizing/code_generator.h')
0 files changed, 0 insertions, 0 deletions