Change Dumb executor to TLS-based one [ECR-3204] - #917
Conversation
| } | ||
|
|
||
| /// Executes a provided closure, making sure that the current thread | ||
| /// is attached to the JVM. Additionally ensures that local object references freed after call. |
There was a problem hiding this comment.
are freed after call?
| #[test] | ||
| fn single_thread() { | ||
| test_single_thread(&*EXECUTOR); | ||
| test_single_thread(EXECUTOR.clone()); |
There was a problem hiding this comment.
Probably not single with the guys below in the same file 🙃
I think we can leave it as is, but please inspect these tests to see if they need to be updated or extended.
There was a problem hiding this comment.
At least nested_attach cannot reliably live in the same source file.
There was a problem hiding this comment.
Actually it can, but it will be unable to check if the thread is detached correctly after the outer-most scope is finished. Other tests a totally fine to live together.
| } | ||
|
|
||
| #[test] | ||
| fn nested_attach() { |
There was a problem hiding this comment.
I think we shall keep it because it verifies the executor implementation allowing recursive with_attached, which some implementations might not permit.
This reverts commit adc7c2a
Overview
See: https://jira.bf.local/browse/ECR-3204
Definition of Done