|
@@ -13,6 +13,7 @@ package interpreter
|
|
|
import (
|
|
|
"os"
|
|
|
"path/filepath"
|
|
|
+ "sync"
|
|
|
|
|
|
"devt.de/krotik/common/timeutil"
|
|
|
"devt.de/krotik/ecal/config"
|
|
@@ -130,6 +131,10 @@ var providerMap = map[string]ecalRuntimeNew{
|
|
|
parser.NodeTRY: tryRuntimeInst,
|
|
|
parser.NodeEXCEPT: voidRuntimeInst,
|
|
|
parser.NodeFINALLY: voidRuntimeInst,
|
|
|
+
|
|
|
+ // Mutex block
|
|
|
+
|
|
|
+ parser.NodeMUTEX: mutexRuntimeInst,
|
|
|
}
|
|
|
|
|
|
/*
|
|
@@ -140,6 +145,7 @@ type ECALRuntimeProvider struct {
|
|
|
ImportLocator util.ECALImportLocator // Locator object for imports
|
|
|
Logger util.Logger // Logger object for log messages
|
|
|
Processor engine.Processor // Processor of the ECA engine
|
|
|
+ Mutexes map[string]*sync.Mutex // Map of named mutexes
|
|
|
Cron *timeutil.Cron // Cron object for scheduled execution
|
|
|
Debugger util.ECALDebugger // Optional: ECAL Debugger object
|
|
|
}
|
|
@@ -173,7 +179,8 @@ func NewECALRuntimeProvider(name string, importLocator util.ECALImportLocator, l
|
|
|
cron := timeutil.NewCron()
|
|
|
cron.Start()
|
|
|
|
|
|
- return &ECALRuntimeProvider{name, importLocator, logger, proc, cron, nil}
|
|
|
+ return &ECALRuntimeProvider{name, importLocator, logger, proc,
|
|
|
+ make(map[string]*sync.Mutex), cron, nil}
|
|
|
}
|
|
|
|
|
|
/*
|