19 Commits

Author SHA1 Message Date
Eli Bendersky
edab962054 Small comment updates to atomic-counters 2023-10-02 05:48:21 -07:00
Erazem Kokot
d1ca2ce65f
Update Atomic Counters example to use atomic.Uint64 (#490)
* Update Atomic Counters example to use atomic.Uint64

This commit updates the Atomic Counters example to follow atomic's
recommendation of using atomic.Uint64 instead of uint64 (same for other
types) and then calling methods on it, instead of calling
atomic.AddUint64().

It also updates the comments and empty lines a bit to look better on the
website.

* Run tools/build again

* Fix comments
2023-10-02 05:43:26 -07:00
Oleg Butuzov
646c8b39da bugfix (mmcgrana/gobyexample#294) sha1 sum calculator
This bugfix implements correct way to calculate source sha1 hash, before it will changed,
by propagation of unchanged sources.

This commit will also include regenerated static files and *.hash files.
2019-10-22 14:27:02 +03:00
Eli Bendersky
b70c15adaa Clarify reading op non-atomically 2019-09-05 13:26:08 -07:00
Eli Bendersky
ef8f0e3831 Deterministic example for atomics.
Fixes #265
2019-09-05 10:50:09 -07:00
Eli Bendersky
7c160440be Use tabs as the canonical source indentation in git
Space conversion is done during generation only. Fixes #192
2019-06-04 07:30:58 -07:00
Mark McGranaghan
47be1a0ff8 Build updates 2018-02-01 16:35:20 -05:00
Noah Zoschke
de34a8a2af drop 0 from declaration (golint) 2018-01-26 09:21:58 -08:00
Mark McGranaghan
6a58750728 Consistently use Sleep in state-management examples
Consistently use `time.Sleep`, instead of `runtime.Gosched`, to ensure all
goroutines can make progress. `Gosched` wasn't working in the playground
(ref #149).

Also stop trying to compare operation rates. This was tenuous given e.g. how
short the programs ran for, and with the `Sleep`s we now expect the rates to
be similar anyways.
2016-12-27 10:13:03 -08:00
Mark McGranaghan
eefab15c72 rebuild 2013-10-07 06:02:02 -07:00
Mark McGranaghan
46fbbfda0f fix worker pools link 2013-10-07 06:00:26 -07:00
Mark McGranaghan
afdf0cc2b4 add trailing newlines 2013-10-06 08:50:23 -07:00
Mark McGranaghan
e77dcdddd4 missing some generated files 2013-09-11 09:01:11 -07:00
Mark McGranaghan
bc0c8b5918 rebuild 2013-06-20 08:11:53 -07:00
Mark McGranaghan
05b6731f1f explain gosched 2013-06-20 08:11:40 -07:00
Leonid Bugaev
9b7c3653d6 Use runtime.Gosched() instead of time.Sleep
Its not clear for newbies that using `time.Sleep` internally calls  `runtime.Gosched()`

Its better to use it directly, moreover on my machine it shows x175 improvement in speed (7m requests per second vs 40k).
2013-06-18 13:23:25 +06:00
Rafael Rosa Fu
c98792e3bf Duplicated footer text
The text announcing mutexes is already on atomic-counters.sh, it's showing twice.
2013-01-03 00:41:20 -05:00
Mark McGranaghan
459d16196a publish mutexes and stateful-goroutines 2012-10-21 19:14:04 -04:00
Mark McGranaghan
e7cb1d1ac8 publish atomic counters 2012-10-19 11:26:54 -04:00