You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue is that once more than one operation runs (e.g. syncing), the application UI rendering thread blocks making app completely frozen. This is especially critical for Flutter apps (but I guess that also applies to native app) where main UI thread needs considerable amount of "CPU time" for app to render frames and be smooth.
One of the option to solve this issue might be setting GOMAXPROCS to e.g. 1. Is it possible with gomobile?
Related improvements to the scheduler allowed us to change the default GOMAXPROCS value (the number of concurrently executing goroutines) from 1 to the number of logical CPUs.
It is not about API that takes up more than one thread, but about blocking calls. For example, imagine a goroutine calls FileOutputStream.write to write a file locally (it may be a bad example, I'm not familiar with Android API. You can probably come up with a better example); this is a blocking call. In a typical go app a goroutine waiting for a blocking call doesn't hold a thread, but let's other goroutines use it. Java doesn't do that, obviously; an entire thread will be just waiting for the blocking call to return. If GOMAXPROCS=4 and 4 goroutines made blocking calls into Java API, all threads may be waiting for the blocking calls to return and program may freeze.
I would appreciate if you could let me know if there is any option to set: GOMAXPROCS to 1 or what would be alternative way of approaching blocking I/O issue in a mobile environment as described by the above comment.
The text was updated successfully, but these errors were encountered:
Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only.
I am running Go library: https://pkg.go.dev/github.com/rclone/rclone/librclone on Android and iOS.
The issue is that once more than one operation runs (e.g. syncing), the application UI rendering thread blocks making app completely frozen. This is especially critical for Flutter apps (but I guess that also applies to native app) where main UI thread needs considerable amount of "CPU time" for app to render frames and be smooth.
One of the option to solve this issue might be setting
GOMAXPROCS
to e.g.1
. Is it possible with gomobile?I've found this update:
https://go.dev/blog/go1.5
#16876 (comment)
and related comment:
I would appreciate if you could let me know if there is any option to set:
GOMAXPROCS
to1
or what would be alternative way of approaching blocking I/O issue in a mobile environment as described by the above comment.The text was updated successfully, but these errors were encountered: