fix: remove superfluous import and global var
Signed-off-by: Christopher Arndt <chris@chrisarndt.de>
This commit is contained in:
parent
9645542176
commit
03d7471656
|
@ -4,14 +4,13 @@
|
||||||
# nimble install threading
|
# nimble install threading
|
||||||
#
|
#
|
||||||
|
|
||||||
import std/[isolation, logging, os, strformat]
|
import std/[logging, os, strformat]
|
||||||
import threading/channels
|
import threading/channels
|
||||||
import signal
|
import signal
|
||||||
import jacket
|
import jacket
|
||||||
|
|
||||||
var
|
var
|
||||||
jclient: ClientP
|
jclient: ClientP
|
||||||
event: MidiEvent
|
|
||||||
midiPort: PortP
|
midiPort: PortP
|
||||||
midiEventChan: Chan[MidiEvent]
|
midiEventChan: Chan[MidiEvent]
|
||||||
midiEventPrinter: Thread[void]
|
midiEventPrinter: Thread[void]
|
||||||
|
@ -32,8 +31,8 @@ proc cleanup() =
|
||||||
debug "Stopping MIDI event printer thread..."
|
debug "Stopping MIDI event printer thread..."
|
||||||
# Receiving an invalid event causes receiving thread to wake up and
|
# Receiving an invalid event causes receiving thread to wake up and
|
||||||
# break its endless loop
|
# break its endless loop
|
||||||
event.size = 0
|
let event = MidiEvent(size: 0)
|
||||||
midiEventChan.send(event)
|
discard midiEventChan.trySend(event)
|
||||||
|
|
||||||
midiEventPrinter.joinThread()
|
midiEventPrinter.joinThread()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue