I get output like:
/tmp $ stack exec --resolver lts-17.5 --package resource-pool --package stm --package hslogger --package time --package concurrent-output -- ghc -O2 -threaded -fwarn-unused-imports testpool.hs && ./testpool
acquire 0 - .81428
acquire 1 - .81431
acquire 2 - .81438
acquire 3 - .81440
acquire 4 - .81448
ThreadId 8: processing 1 - .82460
ThreadId 17: processing 4 - .82461
ThreadId 11: processing 2 - .82464
ThreadId 14: processing 3 - .82464
ThreadId 5: processing 0 - .82465
anything else?
release 4 - .14427
release 3 - .14430
release 2 - .14431
release 1 - .14431
release 0 - .14432
anything else?
anything else?
I expect output like:
/tmp $ stack exec --resolver lts-17.5 --package resource-pool --package stm --package hslogger --package time --package concurrent-output -- ghc -O2 -threaded -fwarn-unused-imports testpool.hs && ./testpool
[1 of 1] Compiling Main ( testpool.hs, testpool.o )
Linking testpool ...
acquire 0
ThreadId 5: processing 0 - .01129
release 0
acquire 1 -- I thought this would have blocked until 0 was released
ThreadId 8: processing 1 - .01120
release 1
acquire 2
ThreadId 11: processing 2 - .01123
release 2
acquire 3
ThreadId 14: processing 3 - .01129
release 3
acquire 4
ThreadId 17: processing 4 - .01129
release 4
anything else?
anything else?
anything else?