ℹ️ Skipped - page is already crawled
| Filter | Status | Condition | Details |
|---|---|---|---|
| HTTP status | PASS | download_http_code = 200 | HTTP 200 |
| Age cutoff | FAIL | download_stamp > now() - 6 MONTH | 10.3 months ago |
| History drop | PASS | isNull(history_drop_reason) | No drop reason |
| Spam/ban | PASS | fh_dont_index != 1 AND ml_spam_score = 0 | ml_spam_score=0 |
| Canonical | PASS | meta_canonical IS NULL OR = '' OR = src_unparsed | Not set |
| Property | Value |
|---|---|
| URL | https://python-forum.io/thread-36751.html |
| Last Crawled | 2025-06-12 08:56:58 (10 months ago) |
| First Indexed | 2022-03-26 06:14:02 (4 years ago) |
| HTTP Status Code | 200 |
| Meta Title | Python multiprocessing Pool apply async wait for process to complete |
| Meta Description | The official dedicated python forum, I have coded a simple program of run through the list, but apply_sync isn't waiting until the list is complete, here is the code import itertools import multiprocessing from multiprocessing import Poo |
| Meta Canonical | null |
| Boilerpipe Text | from multiprocessing import Pool from selenium import webdriver from selenium.webdriver.chrome.options import Options from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys from tkinter import messagebox x = [ 'annah' , 'reena' , 'jermy' , 'sunny' , 'chinni' ] options.binary_location = r 'drivers/Browser/chrome.exe' driver = webdriver.Chrome(executable_path = r 'drivers/chromedriver.exe' , options = options) driver.find_element(By.XPATH, '//input[@name="q"]' ).send_keys(name) driver.find_element(By.XPATH, '//input[@name="q"]' ).send_keys(Keys.ENTER) for usr in itertools.zip_longest(x): y.apply_async(next_name, args = (usr, )) messagebox.showinfo( "Sample Program" , "List Completed" ) os.system( "taskkill /F /IM chromedriver.exe /T" ) startbtn = ttk.Button(root, text = "start" , command = start) stopbtn = ttk.Button(root, text = "stop" , command = stop) multiprocessing.freeze_support() |
| Markdown | [](https://python-forum.io/index.php)
[](https://python-forum.io/index.php)
- [View Active Threads](https://python-forum.io/activethreads.php)
- [View Today's Posts](https://python-forum.io/search.php?action=getdaily)
- [Home](https://python-forum.io/index.php)
- [Forums]()
- [View New Posts](https://python-forum.io/search.php?action=getnew)
- [View Today's Posts](https://python-forum.io/search.php?action=getdaily)
- [My Discussions](https://python-forum.io/search.php?action=do_search&author=&matchusername=1&showresults=threads&postthread=1)
- [Unanswered Posts](https://python-forum.io/search.php?action=unanswered)
- [Unread Posts](https://python-forum.io/search.php?action=unreads)
- [Active Threads](https://python-forum.io/activethreads.php?days=1&hours=0&mins=0&date=Now&order=descending&sort=num_posts&go=Go)
- [Mark all forums read](https://python-forum.io/misc.php?action=markread&my_post_key=482e582ace92195fefc378b9de1b873a)
- [Staff List](https://python-forum.io/showteam.php)
- [Member List](https://python-forum.io/memberlist.php)
- [Help](https://python-forum.io/misc.php?action=help)
- [Calendar](https://python-forum.io/calendar.php)
- [Search](https://python-forum.io/search.php)
- [Statistics](https://python-forum.io/stats.php)
- [Interpreter](https://python-forum.io/misc.php?page=interpreter)
- [IRC](https://python-forum.io/misc.php?page=chat)
##### Python multiprocessing Pool apply async wait for process to complete
- [Python Forum](https://python-forum.io/index.php)
- [Python Coding](https://python-forum.io/forum-7.html)
- [General Coding Help](https://python-forum.io/forum-8-page-189.html)
**Thread Rating:**
- 0 Vote(s) - 0 Average
- [1](https://python-forum.io/ratethread.php?tid=36751&rating=1&my_post_key=482e582ace92195fefc378b9de1b873a)
- [2](https://python-forum.io/ratethread.php?tid=36751&rating=2&my_post_key=482e582ace92195fefc378b9de1b873a)
- [3](https://python-forum.io/ratethread.php?tid=36751&rating=3&my_post_key=482e582ace92195fefc378b9de1b873a)
- [4](https://python-forum.io/ratethread.php?tid=36751&rating=4&my_post_key=482e582ace92195fefc378b9de1b873a)
- [5](https://python-forum.io/ratethread.php?tid=36751&rating=5&my_post_key=482e582ace92195fefc378b9de1b873a)
| | |
|---|---|
| **[Thread Modes]()** **Python multiprocessing Pool apply async wait for process to complete** | |
| | |
| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 | `import` `itertools` `import` `multiprocessing` `from` `multiprocessing``import` `Pool` `import` `time` `from` `tkinter``import` `*` `from` `tkinter``import` `ttk` `from` `selenium``import` `webdriver` `from` `selenium.webdriver.chrome.options``import` `Options` `from` `selenium.webdriver.common.by``import` `By` `from` `selenium.webdriver.common.keys``import` `Keys` `import` `os` `from` `tkinter``import` `messagebox` `x``=` `[``'annah'``,``'reena'``,``'jermy'``,``'sunny'``,``'chinni'``]` `def` `next_name(name):` ` ``options``=` `Options()` ` ``options.binary_location``=` `r``'drivers/Browser/chrome.exe'` ` ``driver``=` `webdriver.Chrome(executable_path``=``r``'drivers/chromedriver.exe'``, options``=``options)` ` ``driver.get(``'<http://google.com>'``)` ` ``time.sleep(``2``)` ` ``driver.find_element(By.XPATH,``'//input[@name="q"]'``).send_keys(name)` ` ``time.sleep(``2``)` ` ``driver.find_element(By.XPATH,``'//input[@name="q"]'``).send_keys(Keys.ENTER)` ` ``time.sleep(``3``)` ` ``driver.close()` `def` `start():` ` ``global` `y` ` ``y``=` `Pool(processes``=``2``)` ` ``for` `usr``in` `itertools.zip_longest(x):` ` ``y.apply_async(next_name, args``=``(usr, ))` ` ``#messagebox has to popup when list is completed` ` ``messagebox.showinfo(``"Sample Program"``,``"List Completed"``)` `def` `stop():` ` ``y.terminate()` ` ``os.system(``"taskkill /F /IM chromedriver.exe /T"``)` `root``=` `Tk()` `startbtn``=` `ttk.Button(root, text``=``"start"``, command``=``start)` `startbtn.pack()` `stopbtn``=` `ttk.Button(root, text``=``"stop"``, command``=``stop)` `stopbtn.pack()` `root.geometry(``'300x300'``)` `if` `__name__``=``=` `'__main__'``:` ` ``multiprocessing.freeze_support()` ` ``root.mainloop()` |
| | |
| 1234567 | `def` `mycallback(x):` ` ``messagebox.showinfo(``"Sample Program"``,``"Completed"``)` `def` `start():` ` ``global` `y` ` ``pool``=` `Pool(processes``=``2``)` ` ``pool.map_async(next_name, x, callback``=``mycallback)` |
| | | | | | |
|---|---|---|---|---|---|
| **Possibly Related Threads…** | | | | | |
| **Thread** | **Author** | **Replies** | **Views** | **Last Post** | |
| | [issue with multiprocessing in embeded python](https://python-forum.io/thread-44078.html) | [otaolafr](https://python-forum.io/user-40652.html) | [1](https://python-forum.io/misc.php?action=whoposted&tid=44078) | 477 | Mar-05-2025, 06:24 PM [Last Post](https://python-forum.io/thread-44078-lastpost.html): [deanhystad](https://python-forum.io/user-23001.html) |
| | [Trying to get JSON object in python and process it further](https://python-forum.io/thread-43433.html) | [Creepy](https://python-forum.io/user-31360.html) | [2](https://python-forum.io/misc.php?action=whoposted&tid=43433) | 1,221 | Oct-24-2024, 08:46 AM [Last Post](https://python-forum.io/thread-43433-lastpost.html): [buran](https://python-forum.io/user-9.html) |
| | [How to process tasks as they complete when using TaskGroup?](https://python-forum.io/thread-43224.html) | [odigity](https://python-forum.io/user-39146.html) | [2](https://python-forum.io/misc.php?action=whoposted&tid=43224) | 1,166 | Sep-17-2024, 03:42 PM [Last Post](https://python-forum.io/thread-43224-lastpost.html): [odigity](https://python-forum.io/user-39146.html) |
|  | [async was never was never awaited but the await is still in the code](https://python-forum.io/thread-42248.html) | [Nietzsche](https://python-forum.io/user-35287.html) | [3](https://python-forum.io/misc.php?action=whoposted&tid=42248) | 1,538 | Jun-04-2024, 02:28 PM [Last Post](https://python-forum.io/thread-42248-lastpost.html): [deanhystad](https://python-forum.io/user-23001.html) |
| | [Is this a multiprocessing bug in Python - or am I doing something wrong?](https://python-forum.io/thread-40426.html) | [haimat](https://python-forum.io/user-35889.html) | [1](https://python-forum.io/misc.php?action=whoposted&tid=40426) | 3,216 | Oct-18-2023, 06:07 AM [Last Post](https://python-forum.io/thread-40426-lastpost.html): [absalom1](https://python-forum.io/user-36502.html) |
| | [queue for async function python telegram.ext](https://python-forum.io/thread-40156.html) | [noctious](https://python-forum.io/user-35551.html) | [0](https://python-forum.io/misc.php?action=whoposted&tid=40156) | 4,384 | Jun-11-2023, 02:58 PM [Last Post](https://python-forum.io/thread-40156-lastpost.html): [noctious](https://python-forum.io/user-35551.html) |
| | [Python Serial: How to read the complete line to insert to MySQL?](https://python-forum.io/thread-39645.html) | [sylar](https://python-forum.io/user-35046.html) | [1](https://python-forum.io/misc.php?action=whoposted&tid=39645) | 1,736 | Mar-21-2023, 10:06 PM [Last Post](https://python-forum.io/thread-39645-lastpost.html): [deanhystad](https://python-forum.io/user-23001.html) |
| | [Question about Creating an Automated Process in Python](https://python-forum.io/thread-39181.html) | [Supratik1234](https://python-forum.io/user-34665.html) | [0](https://python-forum.io/misc.php?action=whoposted&tid=39181) | 1,265 | Jan-13-2023, 08:29 PM [Last Post](https://python-forum.io/thread-39181-lastpost.html): [Supratik1234](https://python-forum.io/user-34665.html) |
| | [python multiprocessing help -- to extract 10 sql table into csv](https://python-forum.io/thread-38727.html) | [mg24](https://python-forum.io/user-33941.html) | [3](https://python-forum.io/misc.php?action=whoposted&tid=38727) | 2,890 | Nov-20-2022, 11:50 PM [Last Post](https://python-forum.io/thread-38727-lastpost.html): [mg24](https://python-forum.io/user-33941.html) |
| | [Multiprocessing Pool Multiple Instances How to Kill by Pool ID](https://python-forum.io/thread-38718.html) | [sunny9495](https://python-forum.io/user-33022.html) | [0](https://python-forum.io/misc.php?action=whoposted&tid=38718) | 1,551 | Nov-16-2022, 05:57 AM [Last Post](https://python-forum.io/thread-38718-lastpost.html): [sunny9495](https://python-forum.io/user-33022.html) |
Users browsing this thread: 1 Guest(s)
- [View a Printable Version](https://python-forum.io/printthread.php?tid=36751)
Powered By [MyBB](https://mybb.com/), © 2020 Designed by[rain](https://community.mybb.com/thread-229223.html).
[Forum Stats](https://python-forum.io/stats.php) [Contact Us](https://python-forum.io/contact.php) [Lite (Archive) Mode](https://python-forum.io/archive/index.php/thread-36751.html) [RSS Syndication](https://python-forum.io/misc.php?action=syndication)
### User Panel Messages
![]()
[Log Out](https://python-forum.io/member.php?action=logout&logoutkey=)
[My Profile Pay your profile a visit](https://python-forum.io/member.php?action=profile&uid=0)
[User Control Panel Do some changes on your profile](https://python-forum.io/usercp.php)
[My Messages View private messages unread](https://python-forum.io/private.php)
[Avatar Change avatar](https://python-forum.io/usercp.php?action=avatar)
[Signature Change signature](https://python-forum.io/usercp.php?action=editsig)
##### Announcements
[Announcement \#1](https://python-forum.io/thread-36751.html) 8/1/2020
[Announcement \#2](https://python-forum.io/thread-36751.html) 8/2/2020
[Announcement \#3](https://python-forum.io/thread-36751.html) 8/6/2020

### Login to Python Forum
Enter your details to login to your account:
Don't have an account yet? [Sign Up\!](https://python-forum.io/member.php?action=register)
[Linear Mode](https://python-forum.io/showthread.php?mode=linear&tid=36751&pid=155242#pid155242)
[Threaded Mode](https://python-forum.io/showthread.php?mode=threaded&tid=36751&pid=155242#pid155242) |
| Readable Markdown | null |
| Shard | 51 (laksa) |
| Root Hash | 14605740506344935851 |
| Unparsed URL | io,python-forum!/thread-36751.html s443 |