| Summary: | setFrame on auxiliary thread causes crash | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Emir Marincic <learath2> |
| Component: | video | Assignee: | Ryan C. Gordon <icculus> |
| Status: | ASSIGNED --- | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | HG 2.1 | ||
| Hardware: | x86_64 | ||
| OS: | macOS 10.15 | ||
| Attachments: | setFrame async | ||
I'm not opposed to this specific patch, but SDL window functions are only valid on the main thread, and making some of them work on some platforms on different threads will lead to confusion and broken applications if that behavior is relied upon. I'm tempted not to include this patch for that reason. Ryan, what are your thoughts? FWIW I also thought this was not the greatest idea, the only reason I made a patch is to see how others feel about it, and the fact that neither linux/x11 nor windows imposed the main thread limitation so I wanted to level the behaviour. |
Created attachment 4283 [details] setFrame async setFrame is only allowed on the main thread, again I'm not sure if you want to support rendering on a thread but this patch fixes the issue. I used GCD to fix it but if you'd rather we use performSelectorOnMainThread again we could use an NSInvocation.