rust-windowing / rust-windowing/winit
using set_title on another thread freeze window
Open
Nobody has claimed this yet.
C - needs investigation
DS - win32
- Dominant language
- Rust
- Stars
- 6.2k
- Forks
- 1.3k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 9
Description
To Produce platform: windows
fn hello(window: Arc<Mutex<Window>>) {
window.lock().unwrap().set_title("title");
}
fn add_hello_to_thread(system: fn(Arc<Mutex<Window>>), window: Arc<Mutex<Window>>) {
thread::spawn(move || system(window))
}
fn to_do(window: Arc<Mutex<Window>>) {
add_hello_to_thread(hello, window)
}
this code freeze the window. resize and other mutable functions work except set title it may get fixed replacing &str with String
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.
Research direction
Start by reproducing the provided Rust example on Windows, then trace the platform-specific implementation of Window::set_title and its thread requirements. Compare it with the mutable functions that work from another thread; done means updating the title from the spawned thread no longer freezes the window and the behavior is covered by an appropriate regression check.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100