Design - HenryHu/pybbs Wiki

Design Problems

Currently, the system is multi-threaded. Since there is no synchronization, there are many problems here.


notify error: unsupported-stanza-type "presence"

Notify thread accessed a ServerCore which has not been initialized.

roster.updater exception: dictionary changed size during iteration

Updater thread was iterating on the rosters._rosters, while a user logged in/logged out, changes rosters._rosters


Either: 1. Add synchronization 2. Restore single-threaded design

Add synchronization

Care: deadlock

single-threaded design

Allow delegated method execution: still requires synchronization Remove other threads: how to inject timeout events?

Unrecognized Stanza "presence" in

Reason unknown. "presence" tag in wrong order?