Hi guys,
I'm implementing some toe algorithm and ran into following strange (as for
me) problem. I'm trying to implement multithreaded algorithm but I decided
to start with one thread before because there is at least one bug in this
algorithm. But in this single-threaded approach I'm trying to use
memoization goroutine and communicate with it through channels. But program
fails with deadlock because all goroutines are in sleep mode and nobody can
read from channel, but as I can see there should be at least one goroutine
running. It fails in get_mem function. Code is
here http://play.golang.org/p/AdmlZS-yHA .
Could somebody more confident with channels point me what is wrong in this
code?
Thanks,
Alex
--