import random

class Trigger(ReadonlyRegisterBase):    
    def doRead(self):
        return None        
        
trigger = Trigger()
trigger.initialize()
sca = "asd"

def scan():
    global sca
    sca = mscan(trigger, [sc1, sin.cache], 20)


scan_task = fork(scan)

time.sleep(0.5)
for i in range(10):
    trigger.update()
    time.sleep(random.random()/5)

#ret = join(scan_task)
