Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Move SynchronizationContext to shared partition #22389

Merged
merged 3 commits into from
Feb 5, 2019

Conversation

marek-safar
Copy link

No description provided.

@marek-safar marek-safar force-pushed the shared4 branch 2 times, most recently from b99bd5f to 87831b1 Compare February 4, 2019 11:15
// See the LICENSE file in the project root for more information.

#if CORERT
using Thread = Internal.Runtime.Augments.RuntimeThread;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The #if CORERT should not be necessary. Thread is already in the same namespace and it will be resolved to the correct class. The using will just become no-op on CoreCLR.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is for CoreRT which still does not have Thread (AFAIK)

Copy link
Member

@filipnavara filipnavara Feb 4, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant to keep the using and drop the #if around it. Sorry, I wasn't clear about it :)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. I have removed it although there is a mixture of both used across the files

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It has to be there if the main class is not in the System.Threading namespace (eg. AsyncMethodBuilders). I agree it's confusing and I will be happy to address that once the strategy is decided upon (#22032).

@marek-safar marek-safar closed this Feb 4, 2019
@marek-safar marek-safar reopened this Feb 4, 2019
@marek-safar marek-safar requested a review from jkotas February 4, 2019 12:31
@filipnavara
Copy link
Member

Btw, the Azure Pipelines CI can usually be restarted by "/AzurePipelines run coreclr-ci" comment. Unfortunately it's been broken for about a week now (dotnet/corefx#34747 (comment)) and it still didn't work as of few minutes ago :-/

{
}

#if !FEATURE_APPX
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be #if !FEATURE_APPX && !ENABLE_WINRT to make it work for ProjectN.

@@ -367,6 +367,9 @@
<Compile Include="$(BclSourcesRoot)\System\Globalization\GlobalizationMode.Windows.cs" />
<Compile Include="$(BclSourcesRoot)\System\Threading\ClrThreadPoolBoundHandle.Windows.cs" />
</ItemGroup>
<ItemGroup Condition="'$(FeatureAppX)' == 'true' or '$(EnableWinRT)' == 'true'">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EnableWinRT is not ever defined in CoreCLR. This can be just '$(FeatureAppX)' == 'true'.

throw new ArgumentNullException(nameof(waitHandles));
}

return WaitHelperNative(waitHandles, waitAll, millisecondsTimeout);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method logically belongs to WaitHandle. Forwarding this onto a method on WaitHandle like it is done in CoreRT seems better to me.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Maybe even keep the null check for the argument in the WaitHandle part.)

@jkotas
Copy link
Member

jkotas commented Feb 4, 2019

LGTM otherwise. Thanks!

Copy link
Member

@jkotas jkotas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@jkotas jkotas merged commit 382dbe4 into dotnet:master Feb 5, 2019
Dotnet-GitSync-Bot pushed a commit to Dotnet-GitSync-Bot/corefx that referenced this pull request Feb 5, 2019
* Move SynchronizationContext to shared partition

* Move WaitHelperNative to WaitHandle

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Dotnet-GitSync-Bot pushed a commit to Dotnet-GitSync-Bot/corert that referenced this pull request Feb 5, 2019
* Move SynchronizationContext to shared partition

* Move WaitHelperNative to WaitHandle

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Dotnet-GitSync-Bot pushed a commit to Dotnet-GitSync-Bot/mono that referenced this pull request Feb 5, 2019
* Move SynchronizationContext to shared partition

* Move WaitHelperNative to WaitHandle

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
jkotas pushed a commit to dotnet/corefx that referenced this pull request Feb 5, 2019
* Move SynchronizationContext to shared partition

* Move WaitHelperNative to WaitHandle

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
jkotas pushed a commit to dotnet/corert that referenced this pull request Feb 5, 2019
* Move SynchronizationContext to shared partition

* Move WaitHelperNative to WaitHandle

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
marek-safar added a commit to mono/mono that referenced this pull request Feb 5, 2019
* Move SynchronizationContext to shared partition

* Move WaitHelperNative to WaitHandle

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
* Move SynchronizationContext to shared partition

* Move WaitHelperNative to WaitHandle


Commit migrated from dotnet/coreclr@382dbe4
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants