New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stop freezing main thread #638
Conversation
automatically set webpage title as window title if user want
Automatically set title of webpage as window title
- multiprocessing added - fixed threading - added two keyword arguments to start method - block(default : True) - daemon(default : True)(works if block is False) ex(block):- ```python import webview w = webview.create_window("ssss","https://www.google.com") join = webview.start(block=False) # set block option to False( default:True ) print('free main thread') # Some code print('blocked main thread') join() # join gui loop to main thread print('free main thread') # this line works after gui loop ended ``` ex(block without join):- ```python import webview w = webview.create_window("ssss","https://www.google.com") join = webview.start(block=False) # set block option to False( default:True ) print('free main thread') # Some code # program exits when no any code run and gui loop ended ``` ex(daemon):- ```python import webview w = webview.create_window("ssss","https://www.google.com") join = webview.start(block=False, daemon=False) # set daemon option to False( default:True ) print('free main thread') # Some code # gui loop stops and exit program ```
Stop freezing Main thread
`real_start` changed to `_start` according to review of @r0x0r
give a try
stop freezing main thread using threading or multiprocessing - remove multiprocessing arg of window class
- remove multiprocessing arg of _initialize
gtk only on linux so used multiprocessing in `fork` method
returns thread to user
- modified current thread checker in create_window - start returns the process if multiprocessing else None
- stop run app.exec_ if multiprocessing is True - create fake Process class - return fake process
sorry, i cant test this on mac so it raises RuntimeError when multiprocessing
Update stale.yml
@r0x0r It's ok. MacOS is working and tested(on github actions). |
This PR has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Hi @r0x0r can you merge this. |
macOS no workie
|
This PR has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Not stale |
This PR has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
not stale |
This PR has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Not stale |
This PR has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Not stale |
This PR has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
The message to post on the pr when closing it. If none provided, will not comment when closing a pull requests. |
stop freezing main thread
so,
other developers are welcomed