@threads in for loop and push! in if statement

It would be helpful if you could post a single-threaded example of what you want to do instead of the chat-GPT answer. Would this solve your problem: Thread-safe array building - #2 by yuyichao ?

1 Like