Skip to content

Python Scripts on Multithreading. This repo shows us various usage of Python's threading module with different sets of requirements.

License

Notifications You must be signed in to change notification settings

arifulhaqueuc/python-multithreading-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Update Center / Repository Update Info

Time: Jan 30 01:00 AM EST
Update Impact: Major

+ This repo is under active development at this time,
- so, frequent and random updates
+ are very likely to happen. Followers are requested to update 
+ their local repository every every other day. Thank you. 

Python-Multithreading-Example

A collection of Python Scripts.

Background

As we all know, in general, running multiple threads simulteneously is equivalent to running several programs at the same time. In such case, threading in Python is a very popular process to attain concurrency and parallelism. Using threading module in a Python program gives us several key advatages such as sharing same data space and operating on light-weight process in order to avoid unnecessary memory overhead.

This repository helps us understand usage of Python's threading module in different programs with various requirements.

Project Overview

Repo Type Script Type
Current Status Phase 1
Development Timeline Start Jan 2018 :: Finish Feb 2018
Application Type Backend
License Type MIT

Project Description

All the following files are avilable in the 'app' directory.

#f03c15 Please note that this description section may not be fully updated as of today as I update this section once a week. You might find more scripts in the acctual application directory. All scripts have short in-script description on the function of the program.

All scripts/examples used Python's threading module.

File Name Difficulty Devel Description
script_1 Beginner This program Print Hello World using threading.
script_2 Beginner This program adds two given numbers and prints the result.
script_3 Beginner This program outputs default thread name when the thread is being executed.
script_4 Beginner A Timer starts its work after a delay, and can be canceled at any point within that delay time period.
script_4_1 Beginner This program prints 1 to 10 with threading module.
script_4 Beginner This program handles timer function.
script_5 Beginner This program creates five threads and each thread prints a string with a two-second interval.
script_6 Beginner This program takes a string input from user and prints the input in a text file.
script_6_1 Beginner This program runs five times and each time the program takes two numbers as given input and prints sum of them.
script_7 TBD TBD
script_8 Beginner This program creates a thread, officially names it and tries to print the name.
script_9 Beginner This program prints output of square and cube of a series of numbers.
script_10 TBD TBD
script_11 Intermediate This program tries to access the values of args and kwargs.
script_12 TBD TBD

Technical Description / Primary Technologies or concepts Used

  • Python 2.7
  • Multithreading

How to Run

  • clone the repo
  • install the requirements from requirements.txt file
  • go to the app directory
  • run individual file

Pre-requisites / Know Before You Go

  • Basic knowledge of Python (version 2.x) is required.
  • Should have basic understanding of Python Multithreading, its importance and usages

Application Functionalities

Becasue this repo is not a project type, in fact it is a collection of several discrete scripts, so their functions are different from one another. Please take a look at the project description to know more about the functionalities of the programs.

Future Direction / Areas of Improvement

Many more programs to come in each week until the above mentioned expected deadline.

Support / Found a bug?

Here are the options

  • Please file an issue with detailed description.
  • If you know a possible solution, please create a new brnach, update the code and then submit pull request.
  • If you would like to reach out to me directly with any question, email me at ariful.haque.uc@gmail.com

General Disclaimer

This is my personal repo and not an official product of any company. If you would like to use this code, please keep it in your mind that, although I have tried to make it as error-free as possible, there's no warranty of a 100% bug free application.

About

Python Scripts on Multithreading. This repo shows us various usage of Python's threading module with different sets of requirements.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages