Skip to content

Run two tabs at a time with threading - #16

Closed
es50678 wants to merge 5 commits into
SeanDaBlack:mainfrom
es50678:add-venv
Closed

Run two tabs at a time with threading#16
es50678 wants to merge 5 commits into
SeanDaBlack:mainfrom
es50678:add-venv

Conversation

@es50678

@es50678 es50678 commented Dec 10, 2021

Copy link
Copy Markdown

I'm newish to python. I want to basically make this so you can pass in args for how many tabs or bowsers you want running at a time.

IE:

python req.py --parrallel 5

would run 5 tabs or browsers at a time

@es50678 es50678 changed the title Add instructions for venv Run two applications at a time with threading Dec 10, 2021
@es50678 es50678 changed the title Run two applications at a time with threading Run two tabs at a time with threading Dec 10, 2021
Comment thread req.py

if __name__ == '__main__':
t1 = threading.Thread(target=main)
t2 = threading.Thread(target=main)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great implementation. One thing to note: python's threading module will not allow you to run both of threads simulataneously. Sadly, only multiprocessing and futures support this. You can read about this here. https://docs.python.org/3/library/threading.html

@pws1453 pws1453 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Functionality provided by threading is better implemented in #21. This should not be pulled. However, this is functional code and a great way to learn the basics of threading.

@BigweldIndustries

Copy link
Copy Markdown
Contributor

#21 Is now closed due to being incredibly behind on pulls. I will create a new pull requests implementing this some time later today

@BigweldIndustries

Copy link
Copy Markdown
Contributor

This approach is deprecated and further discussion should be brought to #39

@es50678

es50678 commented Dec 18, 2021

Copy link
Copy Markdown
Author

@BigweldIndustries @pws1453 thanks for the feedback! Checking out #39 for learning and inspiration. Appreciate being a part of this <3

@es50678 es50678 closed this Dec 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants