Skip to content

Commit 726ca38

Browse files
committed
Merge branch 'feature-async-testing-exec-ctx-correction' of https://github.com/scalatest/scalatest-website
2 parents cf62801 + 799a624 commit 726ca38

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

app/views/userGuide/asyncTesting.scala.html

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,8 @@ <h2>Asynchronous execution model</h2>
155155
</p>
156156

157157
<p>
158-
On both the JVM and Scala.js, the default execution context provided by ScalaTest's asynchronous testing styles confines execution to a single thread per test. On JavaScript,
159-
where single-threaded execution is the only possibility, the default execution context is <code>scala.scalajs.concurrent.JSExecutionContext.Implicits.queue</code>. On the JVM,
160-
the default execution context is a serial execution context provided by ScalaTest itself.
158+
On both the JVM and Scala.js, the default execution context provided by ScalaTest's asynchronous testing styles confines execution to a single thread per test, using serial execution context provided by
159+
ScalaTest itself.
161160
</p>
162161

163162
<p>
@@ -204,12 +203,12 @@ <h2>Asynchronous execution model</h2>
204203
</p>
205204

206205
<p>
207-
To use a different execution context, just override <code>executionContext</code>. For example, if you prefer to use the <code>runNow</code> execution context on Scala.js instead of the default queue,
208-
you would write:
206+
To use a different execution context, just override <code>executionContext</code>. For example, if you prefer to use the <code>queue</code> execution context on Scala.js instead of the default
207+
<code>serial execution context</code> provided by ScalaTest, you would write:
209208
</p>
210209

211210
<pre class="stHighlighted"><span class="stLineComment">// on Scala.js</span>
212-
<span class="stReserved">implicit override def</span> executionContext = scala.scalajs.concurrent.<span class="stType">JSExecutionContext</span>.<span class="stType">Implicits</span>.runNow</pre>
211+
<span class="stReserved">implicit override def</span> executionContext = scala.scalajs.concurrent.<span class="stType">JSExecutionContext</span>.<span class="stType">Implicits</span>.queue</pre>
213212

214213
<p>
215214
If you prefer on the JVM to use the global execution context, which is backed by a thread pool, instead of ScalaTest's default serial execution contex, which confines execution to a single thread,

0 commit comments

Comments
 (0)