mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2025-01-16 14:26:33 -05:00
remove init func from d2thread, moved init logic into d2app.Create
This commit is contained in:
parent
aa8525ff31
commit
90d4238f38
@ -101,6 +101,8 @@ const (
|
||||
|
||||
// Create creates a new instance of the application
|
||||
func Create(gitBranch, gitCommit string) *App {
|
||||
runtime.LockOSThread()
|
||||
|
||||
logger := d2util.NewLogger()
|
||||
logger.SetPrefix(appLoggerPrefix)
|
||||
|
||||
|
@ -3,7 +3,6 @@ package d2thread
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"runtime"
|
||||
)
|
||||
|
||||
// CallQueueCap is the capacity of the call queue. This means how many calls to CallNonBlock will not
|
||||
@ -14,10 +13,6 @@ var (
|
||||
callQueue chan func() //nolint:gochecknoglobals
|
||||
)
|
||||
|
||||
func init() {
|
||||
runtime.LockOSThread()
|
||||
}
|
||||
|
||||
func checkRun() {
|
||||
if callQueue == nil {
|
||||
panic(errors.New("mainthread: did not call Run"))
|
||||
|
Loading…
Reference in New Issue
Block a user