You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create block, e.g. var block = new BufferBlock<bool>(new() { TaskScheduler = TaskScheduler.Current }); and confirm that block.ReceiveAsync() does not use it..
Expected behavior
Should use configured task scheduler or at least be well documented that there is no configuration of task scheduling for some dataflow extension methods.
Actual behavior
Surprising behavior of using unconfigurable global default scheduler. While global default may be sensible default, should either allow customization or document the limitation.
Description
ReceiveAsynccreates aReceiveTargetatruntime/src/libraries/System.Threading.Tasks.Dataflow/src/Base/DataflowBlock.cs
Line 1073 in 14123c9
Reproduction Steps
Create block, e.g.
var block = new BufferBlock<bool>(new() { TaskScheduler = TaskScheduler.Current });and confirm thatblock.ReceiveAsync()does not use it..Expected behavior
Should use configured task scheduler or at least be well documented that there is no configuration of task scheduling for some dataflow extension methods.
Actual behavior
Surprising behavior of using unconfigurable global default scheduler. While global default may be sensible default, should either allow customization or document the limitation.
Regression?
No response
Known Workarounds
None, have to not use the extension methods.
Configuration
No response
Other information
No response