Skip to content

Commit

Permalink
mainthread: disable on windows
Browse files Browse the repository at this point in the history
in reference to #735 (comment) we have no mainthread
library that works on windows. Due to this fact I think that the best solution is to disable mainthread completely for winows until we find some working solution.

I'll create an issue about this as soon as this change is merged to master
  • Loading branch information
gucio321 committed Feb 18, 2024
1 parent 67bf4a3 commit ec81b09
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mainthread_all.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build !darwin
// +build !darwin
//go:build !darwin && !windows
// +build !darwin,!windows

package giu

Expand Down
13 changes: 13 additions & 0 deletions mainthread_windows.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//go:build windows
// +build windows

package giu

// TODO: I have no working mainthread library for windows.
// - this one for macOS crashes app immediately
// - this for linux (and everything else) freezes after a few seconds
//
// With no mianthread support this at least runs sometimes. Just keep your giu calls in one thread and everything should work.
func mainthreadCallPlatform(c func()) {
c()
}

0 comments on commit ec81b09

Please sign in to comment.