crossbeam icon indicating copy to clipboard operation
crossbeam copied to clipboard

Add more golang channel tests (closedchan)

Open fyrchik opened this issue 5 years ago • 0 comments

This addresses #201 , specifically tests from here https://github.com/golang/go/blob/master/test/closedchan.go

I am yet new to Rust. Currently there are 3 issues:

  1. send implementation of Chan can panic while holding the Mutex. This is bad if we want to test for panic to occur. Do you have any suggestions on where should I look? My implementation in comments works in my case, but some other tests are started to take more than 60 seconds.
  2. send in select! for closed channels blocks, because it returns sender for bounded(0). In Go panic is expected. I can implement SenderFlavour which always panics, but it will impose runtime overhead for other code, so it doesn't worth it. Can it be done other way?
  3. problem with packing closures in generic vector (I will deal with it later)

Please let me know your opinion.

fyrchik avatar Aug 15 '19 17:08 fyrchik