If you want multiple threads to push to the same array A in parallel, be aware that you’ll need to use some kind of lock. Alternatively, each thread could push to a different array, and then you could merge them at the end.
Of course, if your code really looks similar to the above, you can probably save a lot of time by careful use of statistics. It might be instructive to look at the implementation of randsubseq to see how it gains efficiency by not iterating over every element, but instead by sampling from the probability distribution on the number of iterations between one push! and the next. You can probably do something similar here.
PS. A = [] allocates an array of Any, which is an abstractly typed container. You probably want A = Int[] so that Julia knows that the elements are Int.