Implement GodotSynchronizationContext#38
Conversation
6f65e37 to
03e0950
Compare
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
raulsntos
left a comment
There was a problem hiding this comment.
Looks generally good. Most of my comments are just questions that came up as I was comparing it with the current implementation in GodotSharp and doesn't necessarily mean a change needs to be made, but if there's no specific reason to differ from the GodotSharp implementation I tend to prefer to keep the status quo.
| if (SynchronizationContext.Current is not GodotSynchronizationContext context) | ||
| { | ||
| return; | ||
| } |
There was a problem hiding this comment.
This check doesn't seem to be in GodotSharp. I guess it's a bit of an edge case anyway.
03e0950 to
0f7c400
Compare
0f7c400 to
c1af80a
Compare
|
Thanks! |
|
An issue has been identified: in GodotSharp, |
I think you can still get this sync ctx via |
I know about |
|
I don't think we want to expose this API, can you provide more details about your use case? I'd recommend opening a new issue describing what you are trying to do, why you need the If all you need is to run some code in the main thread, I believe |
|


As we discussed earlier, this is a basic synchronization context using the engine work at godotengine/godot#106030.
Let me know if you think this should be more elaborate. But for now I've been able to work with this on my personal project without issue.