Repository navigation
Multithreading does not work on OSX #36
Description
Activity
Thanks for that! Trying to get my hands on a Mac to test this issue.
Hey @amalmurali47 - thanks for making the issue. I did have the same issue on mac so it seems to be OSX related. Unfortunately I also no longer have a mac to test on.
Do you think you could just paste the output of the following as proof + testbench?
seq 1 5 > ./test.txt time interlace -tL ./test.txt -threads 5 -c "sleep _target_"When threading works properly, it should take around 5 seconds. If it is single threaded, it will take about 15.
I have a Macbook. Testing isn't working properly for me tonight. Will try again tomorrow and let you know how I go!
Reacted by Michael Skelton- xYantixs-MacBook-Pro:Interlace xyantix$ seq 1 5 > ./test.txt xYantixs-MacBook-Pro:Interlace xyantix$ time python interlace.py -tL ./test.txt -threads 5 -c "sleep _target_" ============================================== Interlace v1.3.4 by Michael Skelton (@codingo_) ============================================== [10:28:09] [THREAD] [sleep 4] Added to Queue [10:28:09] [THREAD] [sleep 5] Added to Queue [10:28:09] [THREAD] [sleep 2] Added to Queue [10:28:09] [THREAD] [sleep 3] Added to Queue [10:28:09] [THREAD] [sleep 1] Added to Queue
real 0m15.236s
user 0m0.055s
sys 0m0.083sAdded a picture because the formatting was funky. Looks single threaded though.
- Awesome! Thanks mate! I'll try to debug what the issue is.…On Sun, 21 Apr. 2019, 12:34 pm xYantix, ***@***.***> wrote: [image: Interlace] <https://user-images.githubusercontent.com/3001014/56464665-ca766a80-6420-11e9-8a98-495219b3fab7.png> `xYantixs-MacBook-Pro:Interlace xyantix$ seq 1 5 > ./test.txt xYantixs-MacBook-Pro:Interlace xyantix$ time python interlace.py -tL ./test.txt -threads 5 -c "sleep _target_" ============================================== Interlace v1.3.4 by Michael Skelton ***@***.***_) ============================================== [10:28:09] [THREAD] [sleep 4] Added to Queue [10:28:09] [THREAD] [sleep 5] Added to Queue [10:28:09] [THREAD] [sleep 2] Added to Queue [10:28:09] [THREAD] [sleep 3] Added to Queue [10:28:09] [THREAD] [sleep 1] Added to Queue real 0m15.236s user 0m0.055s sys 0m0.083s` Added a picture because the formatting was funky. Looks single threaded though. — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#36 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AEBVTU7R4B4T5HUYZWPVLVTPRPHCLANCNFSM4HFXZ5JQ> .
- No worries. Let me know if you need any help with testing. Catch me on here or on the SecTalks Slack :) On Sun, Apr 21, 2019 at 10:44 AM Sajeeb Lohani <[email protected]> wrote:…Awesome! Thanks mate! I'll try to debug what the issue is. On Sun, 21 Apr. 2019, 12:34 pm xYantix, ***@***.***> wrote: > [image: Interlace] > < https://user-images.githubusercontent.com/3001014/56464665-ca766a80-6420-11e9-8a98-495219b3fab7.png > > `xYantixs-MacBook-Pro:Interlace xyantix$ seq 1 5 > ./test.txt > xYantixs-MacBook-Pro:Interlace xyantix$ time python interlace.py -tL > ./test.txt -threads 5 -c "sleep _target_" > ============================================== Interlace v1.3.4 by Michael > Skelton ***@***.***_) ============================================== > [10:28:09] [THREAD] [sleep 4] Added to Queue [10:28:09] [THREAD] [sleep 5] > Added to Queue [10:28:09] [THREAD] [sleep 2] Added to Queue [10:28:09] > [THREAD] [sleep 3] Added to Queue [10:28:09] [THREAD] [sleep 1] Added to > Queue > > real 0m15.236s > user 0m0.055s > sys 0m0.083s` > > Added a picture because the formatting was funky. Looks single threaded > though. > > — > You are receiving this because you commented. > Reply to this email directly, view it on GitHub > <#36 (comment)>, > or mute the thread > < https://github.com/notifications/unsubscribe-auth/AEBVTU7R4B4T5HUYZWPVLVTPRPHCLANCNFSM4HFXZ5JQ > > . > — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#36 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAW4VNXVMLS7I4EGGS7C4WDPRPIINANCNFSM4HFXZ5JQ> .
@hakluke: Sure. Here's the output on my machine:
➜ seq 1 5 > ./test.txt ➜ time interlace -tL ./test.txt -threads 5 -c "sleep _target_" ============================================== Interlace v1.3.3 by Michael Skelton (@codingo_) ============================================== [13:52:39] [THREAD] [sleep 4] Added to Queue [13:52:39] [THREAD] [sleep 5] Added to Queue [13:52:39] [THREAD] [sleep 2] Added to Queue [13:52:39] [THREAD] [sleep 3] Added to Queue [13:52:39] [THREAD] [sleep 1] Added to Queue interlace -tL ./test.txt -threads 5 -c "sleep _target_" 0.17s user 0.09s system 1% cpu 15.278 totalUsing @xYantix's macbook and confirmation from he himself, we've fixed the issue with the multi-threading on OSX.
Reacted by CJ and Luke Stephens (hakluke)(Yay, my first pull request evarrrr!)
Phwoar nice work dudes!


Hi,
When I run like Interlace like this:
It feels more like:
It seems to run everything sequentially. @hakluke confirms that he also faced the same issue.