> > let result = Mutex.try_lock s.ready_m in > > assert (not result) > > The try_lock is really related to the test, so I don't want it to be done > outside of it. Then I guess it is correct in the first way..
Hmm, indeed... since the assertion checks the lock failed the instruction is equivalent to a no-op in expected executions. I stupidly thought some locking was expected here, sorry :/ > By the way, what is the benefit of compiling without assert ? Should we > provide this as an option ? If yes, should it be the default ? Well, no tests are done, it is useful when tests are expensive. For example, in this case, and on some OSs the test might wake the kernel scheduler. But of course, when tests are disabled you won't get an assertion failure when something goes wrong... And for a soft like liquidsoap, I don't think this should be the default. gim ------------------------------------------------------------------------- Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 _______________________________________________ Savonet-devl mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/savonet-devl
