__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()
[((223, 233), 'thinkutils_plus.eventbus.eventbus.EventBus', 'EventBus', ([], {}), '()\n', (231, 233), False, 'from thinkutils_plus.eventbus.eventbus import EventBus\n'), ((277, 296), 'myevent.GreetEvent', 'GreetEvent', (['"""world"""'], {}), "('world')\n", (287, 296), False, 'from myevent import GreetEvent\n'), ((304, 321), 'myevent.ByeEvent', 'ByeEvent', (['"""world"""'], {}), "('world')\n", (312, 321), False, 'from myevent import ByeEvent\n'), ((376, 391), 'time.sleep', 'time.sleep', (['(0.1)'], {}), '(0.1)\n', (386, 391), False, 'import time\n'), ((256, 268), 'mylistener.MyListener', 'MyListener', ([], {}), '()\n', (266, 268), False, 'from mylistener import MyListener\n'), ((416, 428), 'mylistener.MyListener', 'MyListener', ([], {}), '()\n', (426, 428), False, 'from mylistener import MyListener\n')]