1
1
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:
gravestench 2021-01-11 01:17:01 -08:00
parent aa8525ff31
commit 90d4238f38
2 changed files with 2 additions and 5 deletions

View File

@ -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)

View File

@ -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"))