ConcurrentExclusiveSchedulerPair exposes two TaskSchedulers, one for concurrent processing and one for exclusive processing, such that any tasks scheduled are executed in a corresponding fashion. CESP does that by itself scheduling workers to an underlying scheduler, and those workers in turn process the queued tasks. Today this always queues those workers as Tasks, but if the underlying scheduler is TaskScheduler.Default (aka the thread pool), we can avoid per-worker allocations by using the new UnsafeQueueUserWorkItem overload that takes an IThreadPoolWorkItem, and just queueing the same worker object over and over and over.
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
* Avoid having DateTime.TryParse throwing
There are some cases during the parsing which will require adding ticks to the DateTime object we are creating during the parsing.
DateTime.AddTicks can throw which will make DateTime.TryParse fail with throwing instead of just returning false.
The fix here is to avoid throwing in the first place and let DateTime.TryParse return false on such failures.
* Remove the invalid link
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
In the PR #20529 we have used the old existing data when we moved the file CharunicodeInfoData.cs to shared folder.
This change is to restore the actual updated file.
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
* Update Unicode data to version 11
* Move CharUnicodeInfoData.cs to the hsared folder
* Delete un-needed file
* Disable the failed test
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Referencing a generic virtual method from RD.XML didn't result in it being tracked as a generic virtual method in the dependency system (in fact, Debug version of the compiler was hitting an assert because we tried to track it as a non-virtual method).
* Adding DebugProvider to help override Dialog Write and ShowDialog behavior.
- New SetProvider returns previous DebugProvider while exchanging to new one
- Will keep the s_WriteCore delegates for tests until the next PR to fix indentation is merged
Related to: dotnet/corefx#3708, dotnet/corefx#31003
* Move ShowDialog and Write logic from Debug to DebugProvider
* disabling DebugTests
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
The DynamicInvoke thunk is special because they're shared with reflection invoke. They're not instance methods on delegate like the rest of the invoke thunks.
I noticed we were accidentally reporting them from `GetAllMethods` on delegate types even though they're not instance methods. Moving the handling of these to `DelegateThunks` to prevent exposure from places that don't expect them and limit the special casing to a single file (DelegateThunks was already special casing them).
This fixes a regression reported in Gitter. This code path has been wrong for a while, but it was masked behind some other code I deleted last week.
InternalCall and RuntimeImplemented methods are not very different from regular methods in CoreRT (we provide IL for some of them). Filtering them out here meant that we lost some generic tracking (shadow methods) for `Invoke` methods on delegates.
- Changes the internal IThreadPoolWorkItem to be public, removing the legacy ThreadAbortException from it (which was specific to Task, anyway).
- Removes the IThreadPoolWorkItem implementation from Task, so that devs can't write code like `ThreadPool.UnsafeQueueUserWorkItem(task);` or `((IThreadPoolWorkItem)task).Execute();`, both of which could end up doing a variety of bad things that could show up in a variety of ways, some discoverable, some less so.
- Adds an internal UnsafeQueueUserWorkItemInternal that takes object so that it can be passed either an IThreadPoolUserWorkItem or a Task,
- Changes the ThreadPool's queues to be in terms of object instead of IThreadPoolWorkItem
- Changes the dispatch loop to type check for IThreadPoolWorkItem or Task so that both remain supported.
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
With other overloads (including Write(object)) if you passed null it just wouldn't write anything out, so we shouldn't throw for the StringBuilder overload either.
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
* Moving Number.BigInteger to directly use a `fixed-sized buffer`
* Moving Number.NumberBuffer to directly use a `fixed-sized buffer`
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
* `ShadowConcreteMethod` should only depend on things a non-canonical method body would depend - kick out GVM tracking and dictionary rooting (we don't root owning EETypes either).
* Remove a couple unnecessary references to `ShadowConcreteMethod` and make places more explicit on what they actually depend on
[tfs-changeset: 1717010]
Expose an equivalent to Register that doesn't flow ExecutionContext and thus doesn't capture AsyncLocals.
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
This is a middle man class that was supposed to make access to `AttributeType` more efficient for `CustomAttributeData` descendants deriving from it. After #6288 this should no longer be necessary.