› Clovertech Forums › Read Only Archives › Cloverleaf › Cloverleaf › Multiple threads connection › Reply To: Multiple threads connection
As I said before, this seems to be adding unneeded complexity to the interface. Unless you have real performance issues, you may want to reconsider this configuration. Adding another thread to simpify the interface would be my recommendation. I usually save these unusual configurations for interfaces that really need it.
proc over_msg { args } {
keylget args MODE mode ;# Fetch mode
set dispList {} ;# Nothing to return
switch -exact — $mode {
start {
# Perform special init functions
# N.B.: there may or may not be a MSGID key in args
}
run {
# ‘run’ mode always has a MSGID; fetch and process it
keylget args MSGID mh
msgdump $mh
msgmetaset $mh SOURCECONN thread2
msgdump $mh
lappend dispList “OVER $mh”
}
time {
# Timer-based processing
# N.B.: there may or may not be a MSGID key in args
}
shutdown {
# Doing some clean-up work
}
}
return $dispList
}