Homework 2 forum

Lock passed by value

 
Avatar Jinyi Xian
Lock passed by value
par Jinyi Xian, lundi, 9 novembre 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
par Kirill Nikitin, mardi, 10 novembre 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

Avatar Jinyi Xian
Re: Lock passed by value
par Jinyi Xian, mercredi, 11 novembre 2020, 17:23
 
No, I haven't met any