3 ms·
The problem that I keep seeing is people think that TPL or Async/Await heck, even Rx is a Threading library.... As a result people still use monitors or any ki
by TheAnimus 13y ago
The problem that I keep seeing is people think that TPL or Async/Await heck, even Rx is a Threading library....
As a result people still use monitors or any kind of blocking wait event. Including the TaskCompletetionSource in the framework I don't think helped this.
A lot of what I've seen on different projects using these newer tools is an attempt to re-create what they would do before. Doing a Producer Consumer, that's a blocking de-queue etc.
- Strilanc 13y agoWhat's wrong with TaskCompletionSource? I use it constantly. It's great for translating other async styles (like passing a callback as the last argument) into tasks. How would you implement Observable.LastAsync, without using something equivalent to TaskCompletionSource along the way?
- danabramov 13y agoI think your parent is arguing that, despite TaskCompletionSource exists, some people still don't use it much and resort to callbacks (presumably because they have not learned about it). As in “adding TaskCompletionSource to the framework didn't help some folks adjusting to Task style, and they keep using callbacks”.
- Strilanc 13y agoAh, that makes sense.