GLib threads initialization.
This commit is contained in:
parent
7f80f99529
commit
4e9a6ae970
@ -14,7 +14,7 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"net"
|
"net"
|
||||||
//"runtime"
|
"runtime"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
@ -35,6 +35,7 @@ func (p *Pooler) Initialize() {
|
|||||||
fmt.Println("Initializing requester goroutine pooler...")
|
fmt.Println("Initializing requester goroutine pooler...")
|
||||||
// ToDo: figure out how to make this work nice.
|
// ToDo: figure out how to make this work nice.
|
||||||
p.maxrequests = 100
|
p.maxrequests = 100
|
||||||
|
_ = runtime.GOMAXPROCS(runtime.NumCPU() * 4)
|
||||||
p.pp = "\377\377\377\377"
|
p.pp = "\377\377\377\377"
|
||||||
fmt.Println("Pooler initialized")
|
fmt.Println("Pooler initialized")
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,7 @@ import (
|
|||||||
// Main window initialization.
|
// Main window initialization.
|
||||||
func (m *MainWindow) Initialize() {
|
func (m *MainWindow) Initialize() {
|
||||||
|
|
||||||
|
glib.ThreadInit(nil)
|
||||||
gdk.ThreadsInit()
|
gdk.ThreadsInit()
|
||||||
gdk.ThreadsEnter()
|
gdk.ThreadsEnter()
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user