Learning journey for Python---process and process pool

Source: Internet
Author: User

In order for the task to be concurrent we need to open the process

Two ways to open a process

The first is based on function implementation

The second is based on class implementation

The number of open processes is not infinite, so we need to introduce the concept of process pooling

1 # How the program is executed: 2 # One: Serial execution   candied fruit one to 3# Two: Parallel execution go big horizontal 456  # Synchronous invocation: After submitting a task, wait in place, wait until the task is finished, and then execute the next line of code 7# Asynchronous call: After committing a task, Do not wait in situ, directly execute the next line of code, the result? 

Shutdown delegates are not allowed to submit tasks to process dominant, wait=true is the meaning of join: Wait for the task to complete

Learning journey for Python---process and process pool

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.