public void Test2() { while (true) { var obj = new SakuraListener(); EventBus.Default.Post(1); EventBus.Default.Unregister(obj); } }
public void Test1() { Trace.WriteLine(Thread.CurrentThread.ManagedThreadId); var thread = new Thread(ThreadExec); thread.Start(); var obj = new SakuraListener(); var obj2 = new SakuraListener2(); EventBus.Default.Post(new Object()); EventBus.Default.Post(""); EventBus.Default.Post(1); EventBus.Default.Post(1.1); EventBus.Default.Unregister(obj2); EventBus.Default.Post(new Object()); }