int</span> <span class="mdzsyn-string">"Writing to file."</span>)))

<span class="mdzsyn-comment"># Will throw an error, as worker contains a reference to file, which cannot be marshalled.</span>
(<span class="mdzsyn-coresym">thread/new</span> <span class="mdzsyn-symbol">worker</span>)</code></pre><p>The fix here is to move the file creation inside the worker function, since
every worker thread is going to have its own copy of the file handle.
</p>
<pre class="mendoza-codeblock"><code data-language="janet">