Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Shifting back to the default pool in Task.fromFuture, Task.async and … #921
@Avasil honestly, probably a boolean flag with a default value and a consistent descriptive name on main builders (something like
Default parameters would probably make most sense here, as the method is still conceptually doing the same thing (lifting the asynchronous/cancelable operation into a Task) with a minor performance/thread-management option, and we don't have to worry much about eta-expansion issues it can cause due to it being FFI method that requires very explicit handling anyway.
Another option is to add an extra flag to
I will update a PR tomorrow, in my opinion flag fits quite nicely here. Also, if we change our minds it will be easier to deprecate it and introduce extra builders than in the other direction.
I always look at