Shouldn't assert declarations be seen in documentation?
John Colvin via Digitalmars-d
digitalmars-d at puremagic.com
Tue May 12 03:53:03 PDT 2015
On Tuesday, 12 May 2015 at 10:40:48 UTC, tcak wrote:
> I am developing a web server - web application system, and it
> is going to be running on a small system that has 256MB memory
> at maximum. Hence, I tried to use every bit of memory without
> wasting, and used align(1) on a struct type. Because it is used
> as shared, and its internal variables are updated in time,
> core.atomic.atomicOp is being used. Until today, whenever I
> tried to update variables with atomicOp, running thread was
> basically returning from that point like nothing happened.
> After long debugging, I finally saw that thread has given
> AssertError with a line number. There wasn't any information
> about what was going on. I went to core.atomic file, and found
> out that (not on the given line number), variables should be
> properly aligned to use atomicOp.
In my opinion they should be in "in" contracts and documented,
yes.
More information about the Digitalmars-d
mailing list