We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f925116 commit 742eea6Copy full SHA for 742eea6
examples/Stateful-Goroutines.ipynb
@@ -250,7 +250,9 @@
250
" atomic.AddInt64(&ops, 1)\n",
251
" }\n",
252
" }()\n",
253
- "}"
+ "}\n",
254
+ "// let the goroutines work for a second\n",
255
+ "time.Sleep(time.Second)"
256
]
257
},
258
{
@@ -277,7 +279,7 @@
277
279
278
280
"data": {
281
"text/plain": [
- "\u001b[34m\u001b[1m46\u001b[0m\n"
282
+ "\u001b[34m\u001b[1m892297\u001b[0m\n"
283
284
285
"execution_count": 12,
@@ -288,6 +290,13 @@
288
290
"source": [
289
291
"opsFinal := atomic.LoadInt64(&ops)"
292
293
+ },
294
+ {
295
+ "cell_type": "markdown",
296
+ "metadata": {},
297
+ "source": [
298
+ "Running our program shows that the goroutine-based state management example achieves about 800,000 operations per second."
299
+ ]
300
}
301
],
302
"metadata": {
0 commit comments