plugins-workspace icon indicating copy to clipboard operation
plugins-workspace copied to clipboard

fix(single-instance): use a proper background thread to accept and receive unix socket streams

Open cynecx opened this issue 2 months ago • 2 comments

Previously this has blocked a whole tokio worker thread. Causing issues with task wakeups etc. We should never use blocking i/o operations inside an async task, that's why this PR moves that logic to a separate background thread. Alternatively we could still utilize an async task but we'd have to use the async aware UnixListener and co. which would require us to pull in a whole async runtime.

(There are still some things unknown to me because technically tokio should've been able to schedule the task on a different worker thread due to work stealing. But tokio-console shows that the hung task is still stuck in scheduling. EDIT: Ah I think this behavior I am seeing might be the lifo optimization and it being non-stealable)

cynecx avatar Oct 17 '25 14:10 cynecx

Package Changes Through c7496274e2b489b53cea4c648f5501dfc3fa3a6e

There are 10 changes which include deep-link with patch, deep-link-js with patch, fs with patch, fs-js with patch, geolocation with patch, geolocation-js with patch, opener with patch, opener-js with patch, updater with minor, updater-js with minor

Planned Package Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
api-example 2.0.36 2.0.37
api-example-js 2.0.32 2.0.33
deep-link-example-js 2.2.6 2.2.7
deep-link 2.4.3 2.4.4
deep-link-js 2.4.3 2.4.4
fs 2.4.2 2.4.3
fs-js 2.4.2 2.4.3
dialog 2.4.0 2.4.1
dialog-js 2.4.0 2.4.1
geolocation 2.3.0 2.3.1
geolocation-js 2.3.0 2.3.1
opener 2.5.0 2.5.1
opener-js 2.5.0 2.5.1
http 2.5.2 2.5.3
http-js 2.5.2 2.5.3
persisted-scope 2.3.2 2.3.3
single-instance 2.3.4 2.3.5
updater 2.9.0 2.10.0
updater-js 2.9.0 2.10.0

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

github-actions[bot] avatar Oct 17 '25 20:10 github-actions[bot]

Thanks for the PR! Would you mind adding a very small changefile like this as well please? https://github.com/tauri-apps/plugins-workspace/blob/85c83dd2a6ad6e52159ad0dbd1d33b8e6540d3bd/.changes/enhance-fs-error-message.md

FabianLars avatar Oct 17 '25 20:10 FabianLars