Homework 2 forum

Lock passed by value

 
Picture of Jinyi Xian
Lock passed by value
by Jinyi Xian - Monday, 9 November 2020, 20:27
 

I get a warning from the compiler for line 3167 of gossiper_test.go saying


getPs passes lock by value: go.dedis.ch/cs438/hw2/gossip.history


I think this may be a mistake.

profile
Re: Lock passed by value
by Kirill Nikitin - Tuesday, 10 November 2020, 17:05
 

Hi,

Hmm yes we should probably have used a pointer there to pass the struct. But I think it should not cause any issues for the tests. Do you get any problems with running the tests because of it?

Kirill

Picture of Jinyi Xian
Re: Lock passed by value
by Jinyi Xian - Wednesday, 11 November 2020, 17:23
 
No, I haven't met any