-
Notifications
You must be signed in to change notification settings - Fork 598
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unexcpected output #115
Comments
(Trying to help the maintainers clear out some issues...) Why do you think your output is unexpected? Your sleep times are between 1 and 2 seconds, so (usually) the next thing that will happen after a task returns is a new task starting on the same thread that just completed its previous task. This is exactly what your output shows. To see it more clearly, replace your
Everything is completely hunky dory:
|
Hello.
After testing this :
I saw the following output:
Thread #3019622144 working on 7865
Thread #2918909696 finished on 7845
Thread #2918909696 working on 7866
Thread #2876946176 finished on 7846
Thread #2876946176 working on 7867
Thread #3011229440 finished on 7852
Thread #3011229440 working on 7868
Thread #2944087808 finished on 7848
Thread #2944087808 working on 7869
Thread #2935695104 finished on 7856
Thread #2935695104 working on 7870
Thread #2902124288 finished on 7861
Thread #2902124288 working on 7871
Thread #3028014848 finished on 7858
Thread #3028014848 working on 7872
Thread #3002836736 finished on 7855
Thread #3002836736 working on 7873
Thread #2977658624 finished on 7851
Thread #2977658624 working on 7874
Thread #2952480512 finished on 7864
Thread #2952480512 working on 7875
Thread #2986051328 finished on 7849
Thread #2986051328 working on 7876
Thread #2969265920 finished on 7860
Thread #2969265920 working on 7877
Shouldn't be something like this :
Thread #2944087808 finished on 7848
Thread #2944087808 working on 7869
Thread #2918909696 working on 7866
Thread #2876946176 working on 7867
Thread #3028014848 working on 7872
Thread #2952480512 working on 7875
Thread #2935695104 working on 7870
Thread #3028014848 finished on 7858
Thread #2986051328 working on 7876
Thread #2977658624 finished on 7851
Thread #2935695104 finished on 7856
Thread #2952480512 finished on 7864
Thread #2977658624 working on 7874
Thread #3002836736 working on 7873
Thread #2918909696 finished on 7845
Thread #3011229440 working on 7868
Thread #2969265920 working on 7877
Thread #3011229440 finished on 7852
Thread #3019622144 working on 7865
Thread #2986051328 finished on 7849
I have a feeling that this program is executing them one task after another and not in parallel.
I basically want to run some time intensive tasks (most of the time i am waiting for network response) in parallel in this way:
I don't care about getting back any response for any of the tasks submitted.
Thank you for answer.
The text was updated successfully, but these errors were encountered: