Browse Source

chore: Setting the default number of threads to 4

Matthias Ladkau 3 years ago
parent
commit
d9c9cb2822
2 changed files with 9 additions and 1 deletions
  1. 7 1
      config/config.go
  2. 2 0
      config/config_test.go

+ 7 - 1
config/config.go

@@ -36,7 +36,13 @@ const (
 DefaultConfig is the defaut configuration
 */
 var DefaultConfig = map[string]interface{}{
-	WorkerCount: 1,
+
+	/*
+		Number of worker threads in ECAL's ECA engine. This number is also the maximum
+		number of concurrent operations - e.g. how often addEventAndWait can be called
+		in a single event chain.
+	*/
+	WorkerCount: 4,
 }
 
 /*

+ 2 - 0
config/config_test.go

@@ -16,6 +16,8 @@ import (
 
 func TestConfig(t *testing.T) {
 
+	Config[WorkerCount] = 1
+
 	if res := Str(WorkerCount); res != "1" {
 		t.Error("Unexpected result:", res)
 		return