# Error spawning threads: possible timing issue as some not starting in 1.10.2

**URL:** <https://discourse.julialang.org/t/error-spawning-threads-possible-timing-issue-as-some-not-starting-in-1-10-2/111206>\
**Category:** General Usage\
**Created:** [March 5, 2024, 4:38pm UTC](https://discourse.julialang.org/t/error-spawning-threads-possible-timing-issue-as-some-not-starting-in-1-10-2/111206 "2024-03-05T16:38:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ericsfraga](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ericsfraga/32/192_2.png) [@ericsfraga](https://discourse.julialang.org/u/ericsfraga)\
**Post date:** [March 5, 2024, 4:38pm UTC](https://discourse.julialang.org/t/error-spawning-threads-possible-timing-issue-as-some-not-starting-in-1-10-2/111206/1 "2024-03-05T16:38:15Z")

</div>

I have a multi-threaded application (multi-agent system with autonomous agents) which has generally been working fine. I upgraded to 1.10.2 yesterday and since then I noticed that some of the agents were not actually starting. Well, initially, I figured they were starting but not actually doing what I expected them to do. After some investigation, I confirmed that they simply were not starting. I added a short sleep to the code that starts them all up and things are working again.  
The code essentially is:

```julia
for s ∈ 1:ns
    # [...]
    errormonitor(Threads.@spawn someAgent(arguments...))
    sleep(0.1) # just to see if this helps all solvers start
end

```

I will investigate further as I find time but my code is working again. Note that I don’t particularly mind the 0.1 s delay between starting the different threads as the application as a whole takes hours to run. However, I thought I would mention this here in case somebody finds it interesting/useful/worrying (delete as appropriate).
