{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/corefx/issues/23599","repository_url":"https://api.github.com/repos/dotnet/corefx","labels_url":"https://api.github.com/repos/dotnet/corefx/issues/23599/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/corefx/issues/23599/comments","events_url":"https://api.github.com/repos/dotnet/corefx/issues/23599/events","html_url":"https://github.com/dotnet/corefx/issues/23599","id":253289269,"number":23599,"title":"Add ParallelEnumerable.WithTaskScheduler","user":{"login":"asd-and-Rizzo","id":757125,"avatar_url":"https://avatars3.githubusercontent.com/u/757125?v=4","gravatar_id":"","url":"https://api.github.com/users/asd-and-Rizzo","html_url":"https://github.com/asd-and-Rizzo","followers_url":"https://api.github.com/users/asd-and-Rizzo/followers","following_url":"https://api.github.com/users/asd-and-Rizzo/following{/other_user}","gists_url":"https://api.github.com/users/asd-and-Rizzo/gists{/gist_id}","starred_url":"https://api.github.com/users/asd-and-Rizzo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asd-and-Rizzo/subscriptions","organizations_url":"https://api.github.com/users/asd-and-Rizzo/orgs","repos_url":"https://api.github.com/users/asd-and-Rizzo/repos","events_url":"https://api.github.com/users/asd-and-Rizzo/events{/privacy}","received_events_url":"https://api.github.com/users/asd-and-Rizzo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2017-08-28T10:29:41Z","updated_at":"2017-08-28T16:35:36Z","closed_at":null,"body":"Full .NET has internal method to do PLINQ with [custom scheduler](https://github.com/Microsoft/referencesource/blob/master/System.Core/System/Linq/ParallelEnumerable.cs#L303).  Current .NET Core does not have such method in [ParallelEnumerable](https://github.com/dotnet/corefx/blob/a38c5000be0d4b98445ef43d642614d0e8d8f82d/src/System.Linq.Parallel/src/System/Linq/ParallelEnumerable.cs).\r\n\r\nCould we have `WithTaskScheduler` public in `ParallelEnumerable` or any other viable alternative? \r\nI see that [underlying classes do have task scheduler configuration build in](https://github.com/dotnet/corefx/blob/bffef76f6af208e2042a2f27bc081ee908bb390b/src/System.Linq.Parallel/src/System/Linq/Parallel/QueryOperators/QuerySettings.cs#L28).\r\n\r\nWhy this is needed?\r\n\r\nWe have product which did not setup default task scheduler for whole process/appdomain. So we do that that manually. I am afraid to set scheduler process/appdomain wide to avoid regression. Same time I want to use PLINQ instead of Tasks/Parallel, where PLINQ is best fit. But I cannot use PLINQ as customer scheduler is must for us.\r\n\r\nAnother possible reason for such api is virtual isolation. I have witnessed that applications do more and more isolation not on process/appdomain levels, but in process via type loading and di/ioc containers. Another level of isolation could be done with parallelism, but for this all API should accept custom schedulers."},"comment":{"url":"https://api.github.com/repos/dotnet/corefx/issues/comments/325405261","html_url":"https://github.com/dotnet/corefx/issues/23599#issuecomment-325405261","issue_url":"https://api.github.com/repos/dotnet/corefx/issues/23599","id":325405261,"user":{"login":"asd-and-Rizzo","id":757125,"avatar_url":"https://avatars3.githubusercontent.com/u/757125?v=4","gravatar_id":"","url":"https://api.github.com/users/asd-and-Rizzo","html_url":"https://github.com/asd-and-Rizzo","followers_url":"https://api.github.com/users/asd-and-Rizzo/followers","following_url":"https://api.github.com/users/asd-and-Rizzo/following{/other_user}","gists_url":"https://api.github.com/users/asd-and-Rizzo/gists{/gist_id}","starred_url":"https://api.github.com/users/asd-and-Rizzo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asd-and-Rizzo/subscriptions","organizations_url":"https://api.github.com/users/asd-and-Rizzo/orgs","repos_url":"https://api.github.com/users/asd-and-Rizzo/repos","events_url":"https://api.github.com/users/asd-and-Rizzo/events{/privacy}","received_events_url":"https://api.github.com/users/asd-and-Rizzo/received_events","type":"User","site_admin":false},"created_at":"2017-08-28T16:35:36Z","updated_at":"2017-08-28T16:35:36Z","body":"@svick, I may refute and argue most of you arguments, but this thread about request for `TaskScheduler` in PLINQ, not about async/await. "}}
{"actor":{"display_login":"asd-and-Rizzo"}}