__author__ = 'Xsank'
import time
from thinkutils_plus.eventbus.eventbus import EventBus

from myevent import GreetEvent
from myevent import ByeEvent
from mylistener import MyListener


if __name__=="__main__":
    eventbus=EventBus()
    eventbus.register(MyListener())
    ge=GreetEvent('world')
    be=ByeEvent('world')
    eventbus.async_post(be)
    eventbus.post(ge)
    time.sleep(0.1)
    eventbus.unregister(MyListener())
    eventbus.destroy()
[(11, 'thinkutils_plus.eventbus.eventbus.EventBus', 'EventBus', ([], {}), False, 'from thinkutils_plus.eventbus.eventbus import EventBus\n'), (13, 'myevent.GreetEvent', 'GreetEvent', (['"""world"""'], {}), False, 'from myevent import GreetEvent\n'), (14, 'myevent.ByeEvent', 'ByeEvent', (['"""world"""'], {}), False, 'from myevent import ByeEvent\n'), (17, 'time.sleep', 'time.sleep', (['(0.1)'], {}), False, 'import time\n'), (12, 'mylistener.MyListener', 'MyListener', ([], {}), False, 'from mylistener import MyListener\n'), (18, 'mylistener.MyListener', 'MyListener', ([], {}), False, 'from mylistener import MyListener\n')]