|
|
|
|
|
by bad_user
3663 days ago
|
|
> async channels are special cases of sync channels You got it the other way around - synchronous is a special case of asynchronous, because any synchronous result or stream can be processed asynchronously, but for having guaranteed synchronous results you're adding restrictions. And going the other way, from async to sync is not possible without blocking threads, which is an error prone, platform specific hack. Take the possibility of blocking threads away and you'll notice the true nature of these models. |
|
But yes, going from async to sync requires blocking, which is why CML/Hopac takes the approach of making sync the core primitive.