*Re-using the old thread for a new problem that I'm getting:*

fatal error: all goroutines are asleep - deadlock!

I rewrote my 
https://github.com/suntong/lang/blob/master/lang/Go/src/sys/butchers.go 
files from procedure based to OO based, as
https://github.com/suntong/lang/tree/master/lang/Go/src/sys/butchersOO

The two programs behaves exactly the same, however my new "OO" approach 
ended with 

fatal error: all goroutines are asleep - deadlock!
goroutine 1 [semacquire]:

The only reason that I can think of is that,

I changed my goroutine calling from function calling of
`go choppingProblem(i, knifeLeft, knifeRight)`
(https://github.com/suntong/lang/blob/9057e5718e00d396d0fe9a232820bdb79a31df72/lang/Go/src/sys/butchers.go#L79-L82)

to method calling of
`go chopping.choppingAction(i, knifeLeft, knifeRight, &st)`
(https://github.com/suntong/lang/blob/9057e5718e00d396d0fe9a232820bdb79a31df72/lang/Go/src/sys/butchersOO/main.go#L129-L132)

Might that be the reason? 
How to fix the problem?

Thanks


-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/beee5c10-9c8d-4c25-b418-ebe77349938fn%40googlegroups.com.

Reply via email to