Manual polling of the event loop
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 38/100
Research direction
Start by tracing the existing app.run() event-loop entry point and review the linked webview/webview proposal. Define what app.step() must do for a caller-owned main-thread loop, then verify that an external loop can process library events without app.run() blocking.
Written by the indexing model from the issue text.
Description
Is your feature request related to a problem? Please describe.
I'm working with a library that requires managing its own event loop on the main thread. Currently, calling app.run() starts the Wails' event loop but blocks the main thread entirely.
Describe the solution you'd like
I want to implement my own loop where I can process my library's events and call app.step() inside that loop to run one iteration of Wails' event loop.
func main() {
for {
// do stuff
// app.step()
}
}
Describe alternatives you've considered
Apparently Tauri has a function run_on_main_thread that you register on the application's startup and will execute whatever lambda passed in argument on the main thread. I don't know how it works and find it less ergonomic than manually calling app.step()
Additional context
My approach is inspired by an abandoned proposal from this library: https://github.com/webview/webview/pull/735
- Dominant language
- Go
- Stars
- 36.3k
- Forks
- 1.9k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 33
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from wailsapp/wails
-
Bug v3
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Bug v3
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Bug v3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Bug v2
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Bug v2
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Similar issues
-
optimization optimization:agents-md-curator
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
githubnext/gh-aw-cao#13143 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
blinklabs-io/bursa#904 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
yanet-platform/ipfw-go#129 ·
-
bug confmap/provider/googlesecretmanagerprovider needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
open-telemetry/opentelemetry-collector-contrib#51273 · 2 comments ·
-
bug: AI Gateway client filter lists "Unknown" twice when NULL and literal Unknown clients coexist Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 90/100