core-async

bhaim123 2021-02-23T12:20:11.000800Z

Hi, could there be a case that using core.async/<! will throw an exception?

Ben Sless 2021-02-24T08:00:24.002600Z

pipeline-aysnc with parallelism of over 1024 will throw :man-shrugging:

👍 1
Ben Sless 2021-02-23T13:05:17.001Z

if you're taking from an object which is not a channel

2021-02-23T16:29:28.001200Z

If you exceed the limits on the number of waiting takers

2021-02-23T16:30:27.001400Z

A take or put will throw an exception of you have more than 1024 pending operations against that channel

2021-02-23T16:31:07.001600Z

Which is, as far as I've seen, always a bug anyway

bhaim123 2021-02-23T19:02:14.001800Z

Thank you both. @hiredman why 1024? where is this number coming from?

2021-02-23T19:06:42.002Z

I think it is just sort of a magic number. high enough that you are unlikely to trip it with a non-buggy usage pattern, low enough that if have a run away process spinning up an infinite number of go blocks reading from a channel you will hit it