mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-21 03:36:06 +00:00
Clean up and document code throughout the server
This commit is contained in:
parent
c421fd0b25
commit
b87943e39d
6 changed files with 60 additions and 93 deletions
|
|
@ -19,6 +19,10 @@ pub fn get_listener_id() -> ListenerId {
|
|||
ListenerId(LAST_ID.fetch_add(1, Ordering::SeqCst))
|
||||
}
|
||||
|
||||
/// A message queue with persistent history that can be subscribed to.
|
||||
///
|
||||
/// Definitely non-optimal, but a simple design that works well for the
|
||||
/// synchronous web server Rojo uses, Rouille.
|
||||
#[derive(Default)]
|
||||
pub struct MessageQueue<T> {
|
||||
messages: RwLock<Vec<T>>,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue